FXRuby ComboBox problems:

First problem: The empty alternative shows just about two pixels in
height.
""
"male"
"female"
How can I get the full height?

Second problem: The leftmost characters in the combo has a lighter
background color. The number of characters seem to equal the shortest
string
" " # shortest string
"male" # m has lighter background
"female" # f has lighter background
How can I get the correct background color everywhere in the combo?

These are minor problems, but disturbing.
I really love the speed and the API of FX, so I'm not ready to switch
yet.

some code:

    # Win XP, FXRuby 1.4.3
    width = 10
    cbo = FXComboBox.new(@parent, width, nil, 0, COMBOBOX_STATIC)
    cbo.appendItem(" ",0)
    cbo.appendItem("female",1)
    cbo.appendItem("male",2)

···

--
Posted via http://www.ruby-forum.com/.

First problem: The empty alternative shows just about two pixels in
height.
""
"male"
"female"
How can I get the full height?

easiest way is to put a space inside instead of an empty string.
annother way would be setting the layout to LAYOUT_FIX_HEIGHT.

Second problem: The leftmost characters in the combo has a lighter
background color. The number of characters seem to equal the shortest
string
" " # shortest string
"male" # m has lighter background
"female" # f has lighter background
How can I get the correct background color everywhere in the combo?

strange feature isn't it? don't know when the combobox became like
this. anyway here is the trick that removes the selection of the text:
cbo.children[0].killSelection

hth,
-- henon

[snipped]

···

On 4/10/06, Christer Nilsson <janchrister.nilsson@gmail.com> wrote:

I tried the advice, but failed to see any improvement.
LAYOUT_FIX_HEIGHT did not work, and cbo.children[0] refers FXWindow,
not FXTextField, where killSelection is defined.

I must have found a weak spot of FXRuby. The combobox is used for
selecting a string in 90% of all cases. The default behaviour of
FXComboBox is text editing and substring selection.

I've tried to find the source code, but failed.

Christer

···

--
Posted via http://www.ruby-forum.com/.

hmm, sorry. but, i have tried it in FXRuby1.4.4 and i actually got an
FXTextField!
i also checked out the height thing: the height of the combo is always
the same for me ... only the item with the empty string in the list is
very small.

-- henon

···

On 4/11/06, Christer Nilsson <janchrister.nilsson@gmail.com> wrote:

I tried the advice, but failed to see any improvement.
LAYOUT_FIX_HEIGHT did not work, and cbo.children[0] refers FXWindow,
not FXTextField, where killSelection is defined.

I must have found a weak spot of FXRuby. The combobox is used for
selecting a string in 90% of all cases. The default behaviour of
FXComboBox is text editing and substring selection.

I've tried to find the source code, but failed.

Christer