[fxruby-users] Focus and selection in #FXTable

26 views
Skip to first unread message

Damián M. González

unread,
Dec 22, 2012, 11:41:31 AM12/22/12
to Fox C++ users list, FXRuby User List
 Hello guys. I've been researching and playing a lot with FXTable lately. I want to bring to the user the functionality to when there's anything selected in the table, if him press any cursor arrow the selections moves to the respective place, can be above, right, etc. I get it working but, there's something esthetic that botter a little, is the stipple in the last cell clicked in the table, it remains, regardless that another cell is selected, so I can't find any way to remove that or change it to the cell being selected, I've tried with killFocus, setFocus, and etc. Would be nice that when you pass the selection from one cell to another trough press an arrow key in the keyboard also it pass the focus(the stipple) to that cell, so here comes another question to consider if it can be done in the future: what happen if you select(trough the keyboard) an entire row or column? meaby the focus should be moved to the same column but different row if you change the entire row or if you change the entire column(selectColumn) the focus should be moved to the same row but different column. Thanks for your time.

Damián M. González

unread,
Dec 22, 2012, 12:18:49 PM12/22/12
to Fox C++ users list, FXRuby User List
 Well I realized that the event SEL_SELECTED is not working suitably. In the documentation say: "sent when a cell is selected", so you can see that if you go through the cells with the arrow buttons you can see that the stipple is moved correctly to the next cell but not the "blue background", but that's not a big problem compared with the one that SEL_SELECTED event is not trigeered. To test that just do this:

@table.connect(SEL_SELECTED) {|sender, selector, data| puts 'show me this in the console'}

 ...and see if you see something in the console when you iterate manually through the cells, with arrow buttons.

From: gonzale...@hotmail.com
To: foxgui...@lists.sourceforge.net; fxruby...@rubyforge.org
Date: Sat, 22 Dec 2012 13:41:31 -0300
Subject: [Foxgui-users] Focus and selection in #FXTable


 Hello guys. I've been researching and playing a lot with FXTable lately. I want to bring to the user the functionality to when there's anything selected in the table, if him press any cursor arrow the selections moves to the respective place, can be above, right, etc. I get it working but, there's something esthetic that botter a little, is the stipple in the last cell clicked in the table, it remains, regardless that another cell is selected, so I can't find any way to remove that or change it to the cell being selected, I've tried with killFocus, setFocus, and etc. Would be nice that when you pass the selection from one cell to another trough press an arrow key in the keyboard also it pass the focus(the stipple) to that cell, so here comes another question to consider if it can be done in the future: what happen if you select(trough the keyboard) an entire row or column? meaby the focus should be moved to the same column but different row if you change the entire row or if you change the entire column(selectColumn) the focus should be moved to the same row but different column. Thanks for your time.

------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________ Foxgui-users mailing list Foxgui...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/foxgui-users

Damián M. González

unread,
Dec 22, 2012, 12:23:23 PM12/22/12
to Fox C++ users list, FXRuby User List
Sorry for the third reply, i forgot to say someting: you can see, that if you iterate manually through the cells as I said you can check that the @table.currentRow or @table.currentColumn changes. So internally, inside Fox another cell is selected, instead SEL_SELECTED event is not triggered.
Date: Sat, 22 Dec 2012 14:18:49 -0300
Subject: Re: [fxruby-users] [Foxgui-users] Focus and selection in #FXTable
_______________________________________________ fxruby-users mailing list fxruby...@rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users

Damián M. González

unread,
Dec 23, 2012, 8:33:44 AM12/23/12
to Jeroen, Fox C++ users list, FXRuby User List
 Yes! that solve my problem. Thank you Jeroen!!!!!!!

> Date: Sat, 22 Dec 2012 15:42:00 -0600
> From: jer...@fox-toolkit.com
> To: gonzale...@hotmail.com
> Subject: Re: [Foxgui-users] [fxruby-users] Focus and selection in #FXTable
>
> On Sat, 22 Dec 2012 18:18:51 -0300
> Damián M. González <gonzale...@hotmail.com> wrote:
>
> >
> > That's not my case. In mine the table is read-only, when the user double click a cell and when the user press enter with the focus on the table and with one item of the table selected a #FXDialogBox appear, so what I want to acomplish is that, I have to create a SEL_KEYPRESS to catch the enter button pressed, right? but when I do that I stop Fox from go thorugh the cells when the user press the arrow buttons. What I have in mind is that the user can go thorugh the cells with the arrows button and when he desire to open that FXDialogBox where he stand he press enter button, currently I have no idea to resolve the problem.
>
> You can catch SEL_KEYPRESS but process only the KEY_Enter; return 0 for all other
> keys and the FXTable will still process the other key codes.
>
>
> -- JVZ
>
> --
> +----------------------------------------------------------------------------+
> | Copyright (C) 15:40 12/22/2012 Jeroen van der Zijp. All Rights Reserved. |
> +----------------------------------------------------------------------------+
Reply all
Reply to author
Forward
0 new messages