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: <http://rubyforge.org/pipermail/fxruby-users/attachments/20091123/54b18c30/attachment-0001.html>
On Mon, Nov 23, 2009 at 10:20 AM, Stuart Clarke <stuart_clarke86 at yahoo.com>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: <http://rubyforge.org/pipermail/fxruby-users/attachments/20091123/37a40d05/attachment.html>
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 <lyle at lylejohnson.name> wrote: From: Lyle Johnson <lyle at lylejohnson.name> 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 <stuart_clarke86 at yahoo.com> 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: <http://rubyforge.org/pipermail/fxruby-users/attachments/20091124/1f5c92f6/attachment.html>
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 <stuart_clarke86 at yahoo.com>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 <lyle at lylejohnson.name>* wrote: > > > From: Lyle Johnson <lyle at lylejohnson.name> > 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 <stuart_clarke86 at yahoo.com<http://mc/compose?to=stuart_clarke86 at yahoo.com> > > 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://mc/compose?to=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: <http://rubyforge.org/pipermail/fxruby-users/attachments/20091124/b55abbcb/attachment-0001.html>
On Tue, Nov 24, 2009 at 2:42 PM, Stuart Clarke <stuart_clarke86 at yahoo.com>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: <http://rubyforge.org/pipermail/fxruby-users/attachments/20091124/ee81de87/attachment.html>