[fxruby-users] Some questions

Gérard Ménochet gerard.menochet at wanadoo.fr
Tue May 2 11:59:07 EDT 2006

Hi Jeroen, Lyle, everybody

        Thanks for your answers

       I have always the same problem with setFocus on FXComboBox, FXListbox . 
       I tried to use create()  ( seems weird but why not)

       libo =FXListBox.new(parent,nil, 0) 
       (1980..2050).each do |i| libo.appendItem(i.to_s) end


        abnormal program termination
        Kory.rb:30: [BUG] Segmentation fault
        ruby 1.8.4 (2005-12-24) [i386-mswin32]

        I tried a bunch of combinations to try to workaround (e.g.  after the mapping) . No results or "abormal ....."

        More ideas ?   


Gérard Ménochet

On Monday 01 May 2006 19:39, Gérard Ménochet wrote:
> Hi,
> Some questions
> 1_ Is there a standard way to exit from a FXText widget wih the keyboard ?

Its a widget, so it's naturally embedded inside some dialog or other layout
If you mean tabbing out of it, that's not possible; FXText handles tabs
by inserting them into the text.

You can of course jump out using accelerators or shortcuts.

> 2_ I have a problem with the setFocus() on FXComboBox and FXListbox.
>     something like that:
>       libo =FXListBox.new(parent,nil, 0) 
>       (1980..2050).each do |i| libo.appendItem(i.to_s) end
>       libo.setFocus()
>       The widgets don't catch the focus. If I press the tab key, they get it.
> 3_ FXCombox again. I set a selectAll(). When I exit the combo, it is not correctly deselectet. For example, the selected color is blue, when I exit to another widget, it keeps a kind of brown selected color. 

The answer to (2) and (3) is probably that you forgot to call create() to realize
the server-resident resources.  This is necessary for selection since the selection
is something which exists in the X server.
> 4_ FXlistBox FComboBox: it's not possible to navigate on the pane with the down and up arrows ?

No, not with the arrows.  Try the space when the focus is on the menubutton;
the up/down arrows directly roll to the previous/next item in the list
without popping the menu.


 - Jeroen

| Copyright (C) 20:20 05/ 1/2006 Jeroen van der Zijp.   All Rights Reserved. |
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/fxruby-users/attachments/20060502/657bbdd9/attachment.htm 

More information about the fxruby-users mailing list