From gonzalezdamianm at hotmail.com Sun Dec 16 17:19:53 2012 From: gonzalezdamianm at hotmail.com (=?iso-8859-1?B?RGFtaeFuIE0uIEdvbnrhbGV6?=) Date: Sun, 16 Dec 2012 14:19:53 -0300 Subject: [fxruby-users] Bug: FXTable: programmatic deselection doesn't work as expected. Message-ID: Hello Lars and company. Was working with FXTable wdiget; what I want to acomplish is that the the table is read only but full full read only, I mean: the user can't select any cell. Well I realized that it is not possible, so I've tried to look for another solutions, and none of them work for me. The one which put me close to the solution was: "when the user select a cell, then the robot deselect it", something like this: table.connect(SEL_SELECTED) do |sender, selector, data| table.getItem(data.row, data.col).selected=(false) end Well this is curious, what happen' when you click a cell?: It becomes with a 'SelBackColor' blue, and it draw inside a kind of 'stipple': following points surrounding the inner cell. What happen when I did the previous resolution, well the 'stipple' is released, but not the blue 'SelBackColor'. So that's a partial deselection, it should also release the blue color... I've tried also: table.connect(SEL_SELECTED) do |sender, selector, data| table.handle(table, SEL(SEL_DESELECTED, FXTable::ID_DESELECT_ALL), data) end neither work.. hope you can response me, thank you guys. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gonzalezdamianm at hotmail.com Sat Dec 22 16:41:31 2012 From: gonzalezdamianm at hotmail.com (=?iso-8859-1?B?RGFtaeFuIE0uIEdvbnrhbGV6?=) Date: Sat, 22 Dec 2012 13:41:31 -0300 Subject: [fxruby-users] Focus and selection in #FXTable Message-ID: 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. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gonzalezdamianm at hotmail.com Sat Dec 22 17:18:49 2012 From: gonzalezdamianm at hotmail.com (=?iso-8859-1?B?RGFtaeFuIE0uIEdvbnrhbGV6?=) Date: Sat, 22 Dec 2012 14:18:49 -0300 Subject: [fxruby-users] [Foxgui-users] Focus and selection in #FXTable In-Reply-To: References: Message-ID: 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: gonzalezdamianm at hotmail.com To: foxgui-users at lists.sourceforge.net; fxruby-users at 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-users at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/foxgui-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From gonzalezdamianm at hotmail.com Sat Dec 22 17:23:23 2012 From: gonzalezdamianm at hotmail.com (=?iso-8859-1?B?RGFtaeFuIE0uIEdvbnrhbGV6?=) Date: Sat, 22 Dec 2012 14:23:23 -0300 Subject: [fxruby-users] [Foxgui-users] Focus and selection in #FXTable In-Reply-To: References: , Message-ID: 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. From: gonzalezdamianm at hotmail.com To: foxgui-users at lists.sourceforge.net; fxruby-users at rubyforge.org Date: Sat, 22 Dec 2012 14:18:49 -0300 Subject: Re: [fxruby-users] [Foxgui-users] Focus and selection in #FXTable 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: gonzalezdamianm at hotmail.com To: foxgui-users at lists.sourceforge.net; fxruby-users at 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-users at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/foxgui-users _______________________________________________ fxruby-users mailing list fxruby-users at rubyforge.org http://rubyforge.org/mailman/listinfo/fxruby-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From gonzalezdamianm at hotmail.com Sun Dec 23 13:33:44 2012 From: gonzalezdamianm at hotmail.com (=?iso-8859-1?B?RGFtaeFuIE0uIEdvbnrhbGV6?=) Date: Sun, 23 Dec 2012 10:33:44 -0300 Subject: [fxruby-users] [Foxgui-users] Focus and selection in #FXTable In-Reply-To: <20121222154200.5cb69f7a@fox-toolkit.com> References: , , , <20121222115126.487a8f16@fox-toolkit.com>, , , <20121222151229.6c600c96@fox-toolkit.com>, , <20121222154200.5cb69f7a@fox-toolkit.com> Message-ID: Yes! that solve my problem. Thank you Jeroen!!!!!!! > Date: Sat, 22 Dec 2012 15:42:00 -0600 > From: jeroen at fox-toolkit.com > To: gonzalezdamianm at 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 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. | > +----------------------------------------------------------------------------+ -------------- next part -------------- An HTML attachment was scrubbed... URL: From gonzalezdamianm at hotmail.com Thu Dec 27 10:40:17 2012 From: gonzalezdamianm at hotmail.com (=?gb2312?B?RGFtaaiibiBNLiBHb256qKJsZXo=?=) Date: Thu, 27 Dec 2012 07:40:17 -0300 Subject: [fxruby-users] FXDataTarget: am I doing this fine? Message-ID: Hi guys. Have a question to do, been trying to use FXDataTarget to handle a group of #FXLabel showing information. Imagine a group of buttons, each one represents one day in the current month, so will be around 30 of them. When the user press a button, the groups of labels will show information, different depending of which button was pressed last. So the first solution that I though is: "okay... let's make use of FXDataTarget... for the first time". I did something like this: @data_target = FXDataTarget.new @buttons = {} 31.times do ?time? @buttons[time] = FXButton.new(some_packer, time.to_s, target: @data_target, selector: FXDataTarget::ID_OPTION.+(time))end @data_target.connect(SEL_COMMAND) {?sender, selector, data? some_label.text=(@data_target.value)} This doesn't work, in the label appear a nil value, I also printed it in the console, and of course it prints nil. Am I doing something wrong? I expected to the label text change to "1" 'till "31", but doesn't. Thanks for your time. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gonzalezdamianm at hotmail.com Fri Dec 28 12:48:00 2012 From: gonzalezdamianm at hotmail.com (=?gb2312?B?RGFtaaiibiBNLiBHb256qKJsZXo=?=) Date: Fri, 28 Dec 2012 09:48:00 -0300 Subject: [fxruby-users] [Foxgui-users] FXDataTarget: am I doing this fine? In-Reply-To: <20121227153551.3662ec82@daf> References: , <20121227153551.3662ec82@daf> Message-ID: > Ok, I'm not 100% up on Ruby binding particulars, but some observations: > > 1) FXDataTarget should be connected to a variable (not a value) that will will not > go out of scope sooner that FXDataTarget itself does. The reason is FXDataTarget > keeps a pointer to this variable, so it can modify or read its value. > > 2) A SEL_COMMAND (or in some cases, a SEL_CHANGED) from a widget can change the > value of the connected variable (if there is one). > > This works in either of two ways: > > a) an ID_VALUE message is received from the widget; the FXDataTarget will > send ID_GETINTVALUE, ID_GETREALVALUE, or ID_GETSTRINGVALUE to the widget, > depending on the type of the connected variable. > > b) an ID_OPTION + i message is received from the widget. In this case, the > value is expected to be an integer type, and is plucked from the message > itself by subtracting the ID_OPTION. So the value is i in this case. > > 3) A SEL_UPDATE from a widget causes the widget's value to be updated through > the datatarget, from the value of its connected variable: > > a) if the message is ID_VALUE, a message is sent to the widget; the > message id depends on the type of variable connected to the datatarget: > ID_SETINTVALUE is sent for small integer variables, ID_SETLONGVALUE is > sent for long integers, ID_SETREALVALUE is sent for floating point > variables, and ID_SETSTRINGVALUE is sent for string variables. > > b) if the message is ID_OPTION + i, the variable connected to the data- > target is compared to i, and the widget is sent ID_CHECK or ID_UNCHECK > if the value is equal or unequal to i. > > Hope this helps, > > > -- JVZ > > > > +----------------------------------------------------------------------------+ > | Copyright (C) 11:40 12/27/2012 Jeroen van der Zijp. All Rights Reserved. | > +----------------------------------------------------------------------------+ Okay, the explanation is very clean. I don't know how to interpret the point 3, since that is not easy to see how it works, because this happen: @datatarget = FXDataTarget.new @textwidget = FXTextField.new(parent, 10, target: @datatarget, selector: FXDataTarget::ID_VALUE) #so if I do @datatarget.value=("Hello") #it is supposed that the @textwidget will be filled with "Hello" right? because of the selector established, right? the ID_VALUE. It happens. #so what happen if I change the selector to an ID_OPTION @textwidget.selector=(FXDataTarget::ID_OPTION.+(1)) #what happen now? @datatarget.value=("Hi there") #nothing happens #I've tried with another widget @checkbutton = FXCheckButton.new(parent, nil, target: @datatarget, selector: FXDataTarget::ID_VALUE) @datatarget.value=("Hi") #nothing happens @datatarget.value=(true) #it becomes checked!! #if I change the selector to an ID_OPTION the widget will only activate when it receives the number asigned to it in his 'selector' @checkbutton.selector=(FXDataTarget::ID_OPTION.+(1)) @datatarget.value=("House") #nothing happens, but.. @datatarget.value=(1) #the widget becomes checked, interesting right? Is not a simples behaviour, but now I have it more clear So, what I wanted to acomplish was not right with FXDataTargets, I just found another solution: I give each button a different selector: FXWindow::ID_LAST.+(1), and go on... Then I didn't establish any target for them, so the message is catched by it own. So to each button I did something like this: @a_button.connect(SEL_COMMAND) do ?sender, selector, data? do_an_action(FXSELID(selector).-(FXWindow::ID_LAST))end So in that way I can identify which button was pressed an do some action related. I'm very thankfull for the explanation, see you around!! :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From gonzalezdamianm at hotmail.com Sat Dec 29 14:08:51 2012 From: gonzalezdamianm at hotmail.com (=?iso-8859-1?B?RGFtaeFuIE0uIEdvbnrhbGV6?=) Date: Sat, 29 Dec 2012 11:08:51 -0300 Subject: [fxruby-users] Possibility to draw an image on a frame and above it put some widgets Message-ID: Hi friends, been a while since I had in mind if it's possible to draw a picture in some frame, and upthere put some widgets. What I have in mind is: imagine a texture, lets say a carpet, like arabian ones, the texture is an image in .jpg format. It is possible to pick a frame(I have no idea how) and draw that imagine in there filling al the space of the frame. Then in the same frame put some widgets and etc. Is like instead of paint the backColor of the frame, the image is drawn. I know that can show images in any place but what about put widgets above them. Thanks for your time. -------------- next part -------------- An HTML attachment was scrubbed... URL: