[fxruby-users] Option Menu problem (list to long)
Brutyn Nick hotmail
brutyn_nick at hotmail.com
Thu Feb 2 10:48:03 EST 2006
Hey,
thanks that worked great.
i tried
@clientListBox = FXListBox.new(matrix, nil,
0,(FRAME_RAISED|FRAME_THICK|
JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y)).connect
(...)
that didnt work.
U R the best.
Nick
----- Original Message -----
From: <lyle at knology.net>
To: "Brutyn Nick hotmail" <brutyn_nick at hotmail.com>
Cc: <fxruby-users at rubyforge.org>
Sent: Thursday, February 02, 2006 4:34 PM
Subject: Re: [fxruby-users] Option Menu problem (list to long)
>
> On Thu, 2 Feb 2006 16:28:13 +0100, "Brutyn Nick hotmail"
> <brutyn_nick at hotmail.com> wrote :
>
>> ..but i cant seem to get the method getGeotagsByClient() activated
>>
>> Must the target be another listbox?
>>
>> and if i try
>> @clientListBox = FXListBox.new(matrix, getGeotagsByClient(),
>> 0,(FRAME_RAISED|FRAME_THICK|
>> JUSTIFY_HZ_APART|ICON_AFTER_TEXT|LAYOUT_RIGHT|LAYOUT_CENTER_Y))
>>
>> He says the method doesnt exist.
>
> Who is "he"? And why are you passing the return value of
> "getGeotagsByClient()" as the second argument of FXListBox.new? That
> should
> probably be nil:
>
> @clientListBox = FXListBox.new(matrix, nil, 0, ...)
>
> Since FXListBox sends SEL_COMMAND when one its items is selected, you need
> to catch that message:
>
> @clientListBox.connect(SEL_COMMAND) do |sender, sel, data|
> # put message handling code here
> end
>
> and since the documentation told you that the message data is an integer
> indicating the selected item's index:
>
> @clientListBox.connect(SEL_COMMAND) do |sender, sel, data|
> puts "item #{data} was selected"
> end
>
> Hope this helps,
>
> Lyle
>
More information about the fxruby-users
mailing list