From dglnz at yahoo.com Mon Nov 2 02:51:01 2009 From: dglnz at yahoo.com (dave L) Date: Sun, 1 Nov 2009 23:51:01 -0800 (PST) Subject: [fxruby-users] Timer control Message-ID: <352700.27736.qm@web30005.mail.mud.yahoo.com> Was wondering if anyone could via small piece of code show how a timer is envoked. Sometimes (at least for me) a worked sample (with some documentation) is better than having something explained in words. I would be grateful, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From meinrad.recheis at gmail.com Thu Nov 5 05:05:39 2009 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Thu, 5 Nov 2009 11:05:39 +0100 Subject: [fxruby-users] Timer function usage In-Reply-To: <548098.72429.qm@web30002.mail.mud.yahoo.com> References: <548098.72429.qm@web30002.mail.mud.yahoo.com> Message-ID: <43d756720911050205s70f041c9ma30f919f17104626@mail.gmail.com> you need to give it a method: aTimer = @topwin.addTimeout(1000, method(:hello)) hth, -- henon On Thu, Nov 5, 2009 at 9:42 AM, dave L wrote: > Hi Meinrad, > > I have been battling with trying to get the timer event to work - wanting > to have an event/methd run every X minutes. > > from my reading of things this should work but it fails with no > methoderror. > > aTimer = @topwin.addTimeout(1000, (:hello)) > > Hello is a define method further up in code - currently it puts hello to a > listbox every second as proof of it working. > > also tried this. > > aTimer = Timer.new > aTimer = @topwin.addTimeout(1000, (:hello)) > > my ultimate aim is to have it reset after countdown so it's a continous > timer to fire an event that will request a read from a database (thinking in > memory SQLlite at present) and refresh the listbox. > > Oh i did get over my other issues (more of a work around but still) - > that's all working now > > dave. > > > > Email slow, clunky, unreliable? Switch to Yahoo!Xtra Mail, > New Zealand's new email address. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From meinrad.recheis at gmail.com Fri Nov 6 15:58:39 2009 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Fri, 6 Nov 2009 21:58:39 +0100 Subject: [fxruby-users] Timer function usage In-Reply-To: <33699.55746.qm@web30006.mail.mud.yahoo.com> References: <548098.72429.qm@web30002.mail.mud.yahoo.com> <43d756720911050205s70f041c9ma30f919f17104626@mail.gmail.com> <33699.55746.qm@web30006.mail.mud.yahoo.com> Message-ID: <43d756720911061258h165992a5id54bc8d86435b250@mail.gmail.com> lol, you are trying around pretty crazy things :) .. I'll give you a hint: you better not try around so much and instead read the docs more precisely. read this http://www.fxruby.org/doc/events.html here it is written pretty unmistakable how to do it. with working code! -- henon On Fri, Nov 6, 2009 at 7:48 AM, dave L wrote: > Well just tried this code now and got the error below it. > > def hello > #@PSlist2.appendItem('Hello' <%23 at PSlist2.appendItem%28%27Hello%27>) > puts 'hello' > end > > def init > > @topwin.resize(958,670) > > > aTimer = @topwin.addTimeout(1000, method(:hello)) > .... > > end > > >rubyw mymainwin3.rbw > mymainwin3.rbw:39:in `init': undefined method `addTimeout' for > # (NoMethodError) > from ./multitabwin3.rb:6:in `initialize' > from mymainwin3.rbw:13:in `initialize' > from mymainwin3.rbw:106:in `new' > from mymainwin3.rbw:106 > >Exit code: 1 > because of this error think i had tried other variations as per my original > email to you. > > have also tried aTimer = addTimeout.new and also added in a require > 'timeout' statement into the program just in case i had to add in the file > without realising it from documentation. > > Now i've tried something a bit left field. > > this is my thinking be it right or wrong... > > because the error shown implies there is NO object created i added this in > the unit test code... > > #unit test > if __FILE__==$0 > require 'libGUIb16' > app=FX::App.new > w=Fxwindow_code.new app > w.topwin.show(Fox::PLACEMENT_SCREEN) > @aTimer = app.addTimeout.new<<<< in case i needed to create the object > 1st. > app.create > app.run > end > now i have this code > > giving me the error below... > def init > > @topwin.resize(958,670) > > @aTimer {1000 :hello} > >rubyw mymainwin3.rbw > mymainwin3.rbw:39: syntax error, unexpected '{', expecting kEND > @aTimer {1000 :hello} > ^ > >Exit code: 1 > > have tried replacing the {} with DO and END but got an error $end expected. > tried brackets but got unexpected () encountered. > > could you send me a work piece of code? > > like a listbox , toggle button > > push button and timer is started, after timeout text apended to the > listbox, push button again and timeout is removed? > > that way i can see what errors i get (esp if you wroked sample fails). > > rgds, > > Dave. > > ------------------------------ > *From:* Meinrad Recheis > *To:* dave L > > *Cc:* fxruby-users at rubyforge.org > *Sent:* Thu, 5 November, 2009 11:05:39 PM > > *Subject:* Re: Timer function usage > > you need to give it a method: > > aTimer = @topwin.addTimeout(1000, method(:hello)) > > > hth, > -- henon > > On Thu, Nov 5, 2009 at 9:42 AM, dave L wrote: > >> Hi Meinrad, >> >> I have been battling with trying to get the timer event to work - wanting >> to have an event/methd run every X minutes. >> >> from my reading of things this should work but it fails with no >> methoderror. >> >> aTimer = @topwin.addTimeout(1000, (:hello)) >> >> Hello is a define method further up in code - currently it puts hello to a >> listbox every second as proof of it working. >> >> also tried this. >> >> aTimer = Timer.new >> aTimer = @topwin.addTimeout(1000, (:hello)) >> >> my ultimate aim is to have it reset after countdown so it's a continous >> timer to fire an event that will request a read from a database (thinking in >> memory SQLlite at present) and refresh the listbox. >> >> Oh i did get over my other issues (more of a work around but still) - >> that's all working now >> >> dave. >> >> >> >> Email slow, clunky, unreliable? Switch to Yahoo!Xtra Mail, >> New Zealand's new email address. >> > > > Need mail bonding? Bring all your contacts to Yahoo!Xtra with TrueSwitch > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Mon Nov 9 16:51:00 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 9 Nov 2009 15:51:00 -0600 Subject: [fxruby-users] FXRuby table and color questions In-Reply-To: References: Message-ID: <57cf8f720911091351g3c7e688ds1ca5e34e57a349a9@mail.gmail.com> On Mon, Nov 9, 2009 at 1:38 PM, Leslie Viljoen wrote: > Does the Fox toolkit support partial transparency? Not as far as I know. When you assign an icon image to a widget (usually a label or button), FOX will honor any regions identified as fully transparent in the image. For PNGs, it uses the alpha channel to identify regions where alpha is zero; for other image types it can guess the transparent color or you can specify it explicitly. > Also, is it possible to give different background colours to each cell > in a FXTable? The documentation seems to > skirt past this issue with a setCellColor function which only provides > for global shading of every second row/col. > Maybe I am missing something obvious? You aren't missing anything. All you can achieve with the table, short of maybe subclassing it and overriding the drawing behavior, is set alternating cell colors. From lyle at lylejohnson.name Mon Nov 9 17:43:18 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 9 Nov 2009 16:43:18 -0600 Subject: [fxruby-users] [ANN] FXRuby 1.6.20 Now Available Message-ID: <57cf8f720911091443v2e451be1g2396b8695b723611@mail.gmail.com> All, FXRuby version 1.6.20 is now available for download. This release is primarily a transitional one, intended to prove out the significant changes to the development environment. Earlier this year, the FXRuby source code repository was moved from Subversion (hosted at RubyForge) to Git (hosted at GitHub). More recently, I've revamped the build system, replacing some custom scripts with a more standardized process based on the Hoe and rake-compiler extensions to Rake. The intent of these changes is to make it easier for interested parties to participate in FXRuby's development. As a result, despite a good bit of code churn, there are (by design) no significant functional differences between this release and version 1.6.19. For a summary of the changes in this release of FXRuby, please see this page: http://www.fxruby.org/doc/changes.html Enjoy, Lyle From leslieviljoen at gmail.com Wed Nov 11 15:16:22 2009 From: leslieviljoen at gmail.com (Leslie Viljoen) Date: Wed, 11 Nov 2009 22:16:22 +0200 Subject: [fxruby-users] Not receiving FXTopWindow events Message-ID: Hi everyone I'm afraid I posted here: http://www.ruby-forum.com/topic/199028 ..before seeing that that forum looks almost totally dead. Should one of these forums not be shut down to save people some time and false hopes? :-) So I'm going to repost here and reply there to close the topic, thus, hopefully remaining a good netizen. Here is my question: I am trying to listen for the FXTopWindow events SEL_CLOSE, SEL_MINIMIZE, SEL_MAXIMIZE, SEL_RESTORE because I want to execute some code when a person presses the X button to close the window, etc. None of my code gets executed though. Can anyone help? class TextDialog def initialize(parent) construct_widget_tree(parent) init if respond_to? 'init' end def construct_widget_tree(parent) @topwin = FXMainWindow.new(parent, 'title') @topwin.width = 300 @topwin.height = 200 end attr_reader :topwin end if __FILE__==$0 require 'fox16' include Fox app=FXApp.new w=TextDialog.new(app) w.topwin.connect(SEL_CLOSE) { app.exit } w.topwin.connect(SEL_MINIMIZE) { puts "MIN" } w.topwin.connect(SEL_MAXIMIZE) { puts "MAX" } w.topwin.connect(SEL_RESTORE) { puts "RESTORE" } w.topwin.show app.create app.run end From jkinsella at ancillaryservices.com Wed Nov 11 15:39:51 2009 From: jkinsella at ancillaryservices.com (Joey Kinsella) Date: Wed, 11 Nov 2009 15:39:51 -0500 Subject: [fxruby-users] Not receiving FXTopWindow events In-Reply-To: References: Message-ID: <39b4b9790911111239w2b3ef988ne72d6fe3995afaae@mail.gmail.com> As posted here: http://old.nabble.com/programmatically-%22pushing%22-a-button-td14403676.html It appears that when a user selects Maximize or Minimize it actually sends SEL_CONFIGURE. Hope that helps. On Wed, Nov 11, 2009 at 3:16 PM, Leslie Viljoen wrote: > Hi everyone > > I'm afraid I posted here: > http://www.ruby-forum.com/topic/199028 > ..before seeing that that forum looks almost totally dead. Should one > of these forums not be shut down to save people some time and false > hopes? :-) > > So I'm going to repost here and reply there to close the topic, thus, > hopefully remaining a good netizen. > > Here is my question: > > > I am trying to listen for the FXTopWindow events SEL_CLOSE, > SEL_MINIMIZE, SEL_MAXIMIZE, SEL_RESTORE because I want to execute some > code when a person presses the X button to close the window, etc. > > None of my code gets executed though. Can anyone help? > > class TextDialog > def initialize(parent) > construct_widget_tree(parent) > init if respond_to? 'init' > end > > def construct_widget_tree(parent) > @topwin = FXMainWindow.new(parent, 'title') > @topwin.width = 300 > @topwin.height = 200 > end > > attr_reader :topwin > end > > if __FILE__==$0 > require 'fox16' > include Fox > > app=FXApp.new > w=TextDialog.new(app) > > w.topwin.connect(SEL_CLOSE) { app.exit } > w.topwin.connect(SEL_MINIMIZE) { puts "MIN" } > w.topwin.connect(SEL_MAXIMIZE) { puts "MAX" } > w.topwin.connect(SEL_RESTORE) { puts "RESTORE" } > > w.topwin.show > app.create > app.run > end > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > -- If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or other use of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Wed Nov 11 16:46:00 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Wed, 11 Nov 2009 15:46:00 -0600 Subject: [fxruby-users] Not receiving FXTopWindow events In-Reply-To: References: Message-ID: <57cf8f720911111346r1f62b016kb0b2bbf3fb94ac2b@mail.gmail.com> On Wed, Nov 11, 2009 at 2:16 PM, Leslie Viljoen wrote: > I'm afraid I posted here: > http://www.ruby-forum.com/topic/199028 > ..before seeing that that forum looks almost totally dead. Should one > of these forums not be shut down to save people some time and false > hopes? ?:-) I agree with you, but it's not my forum to shut down. :) I don't have the bandwidth to monitor the Internet for all of these little discussion pockets. This mailing list has always been (and continues to be) the place for FXRuby chatter. > So I'm going to repost here and reply there to close the topic, thus, > hopefully remaining a good netizen. Thanks. ;) > Here is my question: > > I am trying to listen for the FXTopWindow events SEL_CLOSE, > SEL_MINIMIZE, SEL_MAXIMIZE, SEL_RESTORE because I want to execute some > code when a person presses the X button to close the window, etc. > > None of my code gets executed though. Can anyone help? Per the message found by Joey Kinsella (elsewhere in this thread) it sounds like the documentation for FXTopWindow needs to be corrected to reflect the fact that you only get SEL_MINIMIZE, SEL_MAXIMIZE, SEL_RESTORE and SEL_CLOSE when you call one of those FXTopWindow methods (e.g. FXTopWindow#maximize); otherwise you just get SEL_CONFIGURE. I'm not sure why the documentation wasn't corrected when that problem was originally reported. Leslie, could you please file a bug report on this on the new bug tracker at Lighthouse? http://fxruby.lighthouseapp.com/projects/40125-fxruby Thanks, Lyle From lyle at lylejohnson.name Thu Nov 12 12:02:12 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Thu, 12 Nov 2009 11:02:12 -0600 Subject: [fxruby-users] Concerning the "FXRuby" forum at ruby-forum.com Message-ID: <57cf8f720911120902o5f5bdafdy776ca08dd4b9218@mail.gmail.com> Andreas, On your ruby-forum.com web site you include an "FXRuby" forum that is described as "fxruby-users mailing list". I think this has probably led to a lot of frustration for people who post questions there (instead of on the real fxruby-users mailing list, hosted at RubyForge), since I don't monitor your forum and thus don't see those questions. I don't want to tell you how to run your site, but I wonder if you could you at least add some kind of disclaimer that points people to the real mailing list, in case none of your forum readers are able to help them? Thanks in advance, Lyle From benjaminrub-upf at hotmail.de Sat Nov 14 11:55:05 2009 From: benjaminrub-upf at hotmail.de (Benjamin Sebastian Kolz) Date: Sat, 14 Nov 2009 17:55:05 +0100 Subject: [fxruby-users] FXRuby/ questions about fotos Message-ID: Hi everybody, I've got two questions mainly about fotos in FX Ruby. I read the FX Ruby book and I'm using the "scale to thumbnail" method in my project. Extract from the main code: @logo="logo_small.jpeg" logo_load=ImageViewer.new(self, at logo) 1. How can I position the foto in the window? If I create a bottom, f. ex., I have LAYOUT_EXPLICIT, :x => 50, :y => 200, :width => 200, :height => 200, but how can I select the x- and y-value for the foto? Any idea? 2. I would like to put this logo also into the title bar... is that possible? some code: class Main_Window < FXMainWindow def self.toggle(nr, *args) @@switcher.setCurrent(nr) @@window[nr].set_text(args[0].to_s) end def initialize(app) super(app, 'Title bar text', :width=>800, :height=>600) # can I add a foto (logo) to the text in the title bar? init_frameset end Thanks in advance for any response! Have a nice weekend Benjamin _________________________________________________________________ http://redirect.gimas.net/?n=M0911xMSWin72 Windows 7 - jetzt upgraden! -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Wed Nov 18 09:22:00 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Wed, 18 Nov 2009 08:22:00 -0600 Subject: [fxruby-users] FXRuby/ questions about fotos In-Reply-To: References: Message-ID: <57cf8f720911180622ha165684p4f1c094ff48f8c4@mail.gmail.com> On Sat, Nov 14, 2009 at 10:55 AM, Benjamin Sebastian Kolz wrote: > I've got two questions mainly about fotos in FX Ruby. > > I read the FX Ruby book and I'm using the "scale to thumbnail" method in my > project. OK. > Extract from the main code: > > @logo="logo_small.jpeg" > logo_load=ImageViewer.new(self, at logo) > > > 1. How can I position the foto in the window? If I create a bottom, f. ex., > I have > ?? LAYOUT_EXPLICIT, :x => 50, :y => 200, :width => 200, :height => 200, but > how can > ?? I select the x- and y-value for the foto? Any idea? Well, without any of the code for your ImageViewer class, I don't know how to answer that question. > 2. I would like to put this logo also into the title bar... is that > possible? Yes, I think that's what the "miniIcon" argument is for in FXMainWindow's constructor. From stuart_clarke86 at yahoo.com Mon Nov 23 11:20:42 2009 From: stuart_clarke86 at yahoo.com (Stuart Clarke) Date: Mon, 23 Nov 2009 16:20:42 +0000 (GMT) Subject: [fxruby-users] Best class to use Message-ID: <657373.7255.qm@web86608.mail.ird.yahoo.com> Hello all, I am looking for input to an issue I am facing. I want to write a simple GUI that will be used by users for logging. The GUI needs the following A text area for loggingAn area for time stamping every new line createdA frame area with buttons to select file pathsThe ability to out a text based report showing each entry from the text area with its time stamp alongsideMy initial thoughts are a text area for the input, but I am unsure how I can link this to an area for time stamping? I intend to have a small frame at the bottom of the GUI with a button and corresponding text field allowing users to select a folder with dirlist. My intended GUI will be as follows: TEXT AREA ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TIME STAMPTEXT AREA ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TIME STAMPTEXT AREA ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TIME STAMPTEXT AREA ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TIME STAMPTEXT AREA ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TIME STAMPTEXT AREA ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TIME STAMPTEXT AREA ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? TIME STAMPETC, ETCFRAME - BUTTON ? ? ? ? TEXT FIELD My report that I generate from this information will link the text area and time stamp together. I hope this makes sense. Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Mon Nov 23 12:23:52 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Mon, 23 Nov 2009 11:23:52 -0600 Subject: [fxruby-users] Best class to use In-Reply-To: <657373.7255.qm@web86608.mail.ird.yahoo.com> References: <657373.7255.qm@web86608.mail.ird.yahoo.com> Message-ID: <57cf8f720911230923ta57fa81j4b9f2019a24eeee@mail.gmail.com> On Mon, Nov 23, 2009 at 10:20 AM, Stuart Clarke wrote: My initial thoughts are a text area for the input, but I am unsure how I can > link this to an area for time stamping? > I don't think I understand what it is that you're unsure about. Are you asking how to achieve this kind of layout? I think I would put each text area/time stamp pair of widgets inside some container (e.g. an FXHorizontalFrame). Or maybe I'd put all of the text area/time stamp pairs in an FXMatrix container--actually, that sounds better. And you'll presumably want to put that outermost container into a scrolling window. -------------- next part -------------- An HTML attachment was scrubbed... URL: From leslieviljoen at gmail.com Mon Nov 23 14:01:53 2009 From: leslieviljoen at gmail.com (Leslie Viljoen) Date: Mon, 23 Nov 2009 21:01:53 +0200 Subject: [fxruby-users] SEL_CONFIGURE Message-ID: Hi Thanks for the information on SEL_CONFIGURE. It seems that that message gets sent a few times during the window's lifecycle and there seems to be no way to tell those times apart from the time when the 'x' button in the corner is clicked. Or is there a way? From meinrad.recheis at gmail.com Tue Nov 24 03:45:21 2009 From: meinrad.recheis at gmail.com (Meinrad Recheis) Date: Tue, 24 Nov 2009 09:45:21 +0100 Subject: [fxruby-users] fxruby1.6.20 In-Reply-To: <7534.1060.qm@web30002.mail.mud.yahoo.com> References: <7534.1060.qm@web30002.mail.mud.yahoo.com> Message-ID: <43d756720911240045j7c48cf27i27bcc38019da1238@mail.gmail.com> Are there any serious foxguib problems with newer fxruby versions? I am not able to further support foxguib all alone, but I would accept and review any patches ... ;) Anyone feel free to clone foxguib on github: http://github.com/henon/foxguib Cheers, -- henon On Tue, Nov 24, 2009 at 9:37 AM, dave L wrote: > I've just created another XP VM (I run linux as my main OS). > > anyway I just had a thought and wnat you input on fxruby upgrades. > > Do you foresee a time or a point where you will need to revisit foxguib to > keep it current with the other features? > > or even fox (currently i use fox16 but there maybe an iteration fox20 or > whatever. > > cheers, > > Dave. > > Need mail bonding? Bring all your contacts to Yahoo!Xtra with TrueSwitch > -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuart_clarke86 at yahoo.com Tue Nov 24 15:42:45 2009 From: stuart_clarke86 at yahoo.com (Stuart Clarke) Date: Tue, 24 Nov 2009 20:42:45 +0000 (GMT) Subject: [fxruby-users] Best class to use In-Reply-To: <57cf8f720911230923ta57fa81j4b9f2019a24eeee@mail.gmail.com> Message-ID: <597045.13098.qm@web86603.mail.ird.yahoo.com> At present I have two text areas, one for data (input area) and one for the time stamp (date area) in two horizontal frames. My questions are, how can I create the text field as an append-able area? For example, as a user I want to type things into the text area (input area) and I will also click buttons which will add some data to the input area also. At present when I click the buttons to add data it clears the text field (input area). My second question is, how do I get the GUI to respond to new lines being entered into the text area (input area)? Each time a line is filled or the user hits the enter/return button I want the time to entered into the date area for the corresponding line in the input area for example INPUT AREA ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? DATE AREAthis is my data, i am the user (USER HITS ENTER FOR NEW LINE) ? ? ? ? ? ? Date value I hope this is a bit clearer, many thanks Stuart --- On Mon, 23/11/09, Lyle Johnson wrote: From: Lyle Johnson Subject: Re: [fxruby-users] Best class to use To: fxruby-users at rubyforge.org Date: Monday, 23 November, 2009, 17:23 On Mon, Nov 23, 2009 at 10:20 AM, Stuart Clarke wrote: My initial thoughts are a text area for the input, but I am unsure how I can link this to an area for time stamping? I don't think I understand what it is that you're unsure about. Are you asking how to achieve this kind of layout? I think I would put each text area/time stamp pair of widgets inside some container (e.g. an FXHorizontalFrame). Or maybe I'd put all of the text area/time stamp pairs in an FXMatrix container--actually, that sounds better. And you'll presumably want to put that outermost container into a scrolling window. -----Inline Attachment Follows----- _______________________________________________ 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 jkinsella at ancillaryservices.com Tue Nov 24 16:05:49 2009 From: jkinsella at ancillaryservices.com (Joey Kinsella) Date: Tue, 24 Nov 2009 16:05:49 -0500 Subject: [fxruby-users] Best class to use In-Reply-To: <597045.13098.qm@web86603.mail.ird.yahoo.com> References: <57cf8f720911230923ta57fa81j4b9f2019a24eeee@mail.gmail.com> <597045.13098.qm@web86603.mail.ird.yahoo.com> Message-ID: <39b4b9790911241305q262b68bo9c4da863d56f8120@mail.gmail.com> Are you sure you actually need to use a text area for the display portion? Part of what you may be able to do is use an FXIconList, to create a "preview", and a "timestamp" area. the user would be able to double click on the FXIconList to see the full details past the "preview". In my experience it is much easier to append data to a list like item, that it is to try and re-draw widgets every time something happens. You could do something like this: +---------------------------------------------------------------------+ | Item Preview | Timestamp | +---------------------------------------------------------------------+ | Here is some preview text | 2009-11-24 15:39:09 | | Here is some more preview text that is re...| 2009-11-24 16:00:03 | | | | | | | | | | | | | +---------------------------------------------------------------------- Enter data: +---------------------------------------------+ | Text area to submit data | [ Some other button ] | | [ Another Button ] | | [ Submit Button ] +---------------------------------------------+ I don't fully understand all your needs, so forgive me if I am way off, but from what I can gather something like this is what you are looking for, and something like this would also be a lot easier to code than what I think you are trying to code. Thanks, Joey On Tue, Nov 24, 2009 at 3:42 PM, Stuart Clarke wrote: > At present I have two text areas, one for data (input area) and one for the > time stamp (date area) in two horizontal frames. > > My questions are, how can I create the text field as an append-able area? > For example, as a user I want to type things into the text area (input area) > and I will also click buttons which will add some data to the input area > also. At present when I click the buttons to add data it clears the text > field (input area). > > My second question is, how do I get the GUI to respond to new lines being > entered into the text area (input area)? Each time a line is filled or the > user hits the enter/return button I want the time to entered into the date > area for the corresponding line in the input area for example > > INPUT AREA > DATE AREA > this is my data, i am the user (USER HITS ENTER FOR NEW LINE) > Date value > > I hope this is a bit clearer, many thanks > > Stuart > > --- On *Mon, 23/11/09, Lyle Johnson * wrote: > > > From: Lyle Johnson > Subject: Re: [fxruby-users] Best class to use > To: fxruby-users at rubyforge.org > Date: Monday, 23 November, 2009, 17:23 > > > On Mon, Nov 23, 2009 at 10:20 AM, Stuart Clarke > > wrote: > > My initial thoughts are a text area for the input, but I am unsure how I >> can link this to an area for time stamping? >> > > I don't think I understand what it is that you're unsure about. Are you > asking how to achieve this kind of layout? I think I would put each text > area/time stamp pair of widgets inside some container (e.g. an > FXHorizontalFrame). Or maybe I'd put all of the text area/time stamp pairs > in an FXMatrix container--actually, that sounds better. And you'll > presumably want to put that outermost container into a scrolling window. > > -----Inline Attachment Follows----- > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > > > > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > -- If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or other use of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkinsella at ancillaryservices.com Tue Nov 24 16:24:40 2009 From: jkinsella at ancillaryservices.com (Joey Kinsella) Date: Tue, 24 Nov 2009 16:24:40 -0500 Subject: [fxruby-users] SEL_CONFIGURE In-Reply-To: References: Message-ID: <39b4b9790911241324r88daff6u4e0d59d1590a7737@mail.gmail.com> If it's the main window of your application, you might be able to just get away with doing something after app.run is finished. ie: require 'fox16' include Fox a = FXApp.new w = FXMainWindow.new(a, 'title', :width=>320, :height=>240) a.create w.show(PLACEMENT_SCREEN) a.run puts "My Cleanup code!" --- On Mon, Nov 23, 2009 at 2:01 PM, Leslie Viljoen wrote: > Hi > > Thanks for the information on SEL_CONFIGURE. It seems that that > message gets sent a few times during the window's lifecycle and there > seems to be no way to tell those times apart from the time when the > 'x' button in the corner is clicked. > > Or is there a way? > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > -- If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or other use of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyle at lylejohnson.name Tue Nov 24 16:51:26 2009 From: lyle at lylejohnson.name (Lyle Johnson) Date: Tue, 24 Nov 2009 15:51:26 -0600 Subject: [fxruby-users] Best class to use In-Reply-To: <597045.13098.qm@web86603.mail.ird.yahoo.com> References: <57cf8f720911230923ta57fa81j4b9f2019a24eeee@mail.gmail.com> <597045.13098.qm@web86603.mail.ird.yahoo.com> Message-ID: <57cf8f720911241351v1fda825bnf2378219b6a63013@mail.gmail.com> On Tue, Nov 24, 2009 at 2:42 PM, Stuart Clarke wrote: My questions are, how can I create the text field as an append-able area? > For example, as a user I want to type things into the text area (input area) > and I will also click buttons which will add some data to the input area > also. At present when I click the buttons to add data it clears the text > field (input area). > Well, to append text to an FXText widget, you can use the FXText#appendText method. If it's an FXTextField, you'd need to grab the current text field content, add the new content to it, and then set it back to the FXTextField, e.g. text_field.text = text_field.text + "some appended text" My second question is, how do I get the GUI to respond to new lines being > entered into the text area (input area)? Each time a line is filled or the > user hits the enter/return button I want the time to entered into the date > area for the corresponding line in the input area for example > > INPUT AREA > DATE AREA > this is my data, i am the user (USER HITS ENTER FOR NEW LINE) > Date value > I think the easiest way would be to listen for either the SEL_INSERTED or SEL_CHANGED message from the FXText widget; see the API documentation for more information: http://www.fxruby.org/doc/api/classes/Fox/FXText.html Hope this helps, Lyle -------------- next part -------------- An HTML attachment was scrubbed... URL: