Hello all, I have a quick query regarding the output of data to an FXTextFrame. Currently I have an FXHeader with several headers in it and below it I have a text frame where data is output to. The output of data has not real formatting at the moment. Each field of data is seperated by a tab character in an array, which has join("\n") called on it to get it onto the GUI. This outputs the data in a messy manner as some strings in the fields are longer than other etc. Is there a way to say everything under heading A must not exceed 75 chars giving a nice structured list in columns. Each of my headings have set sizes but the text frame is just a text frame. Is this something that would need to be set in the array as the data is loaded into it? Or is there something simple I can do in the GUI. Effectivly I want an output like this: HEADING 1 HEADING 2 HEADING 3 QWERTYUIOP ASDFGHJK DFGHJKLHJ FG DFGHJKL SDFGHDFGHJK DFGH G SDFGHJKL At the moment I get something like this: HEADING 1 HEADING 2 HEADING 3 QWERTYUIOP ASDFGHJK DFGHJKLHJ FG DFGHJKL SDFGHDFGHJK DFGH G SDFGHJKL The latter is not very nice. Thanks in advance for your help. Kind regards Stuart
On Mar 30, 2009, at 4:55 AM, Stuart Clarke wrote:> Is there a way to say everything under heading A must not exceed 75 > chars giving a nice structured list in columns. Each of my headings > have set sizes but the text frame is just a text frame. Is this > something that would need to be set in the array as the data is > loaded into it? Or is there something simple I can do in the GUI.It''s a combination of the two, sort of. You will probably want to choose a fixed-width font for the FXText widget, and then format the text (i.e. your data array) such that each column''s content doesn''t exceed the width of the headers.
Thanks for your reply. I am afraid I am not to sure what you mean. When you push data to an array I wasn''t aware you can set its size. Would you mind giving me an example or a link to find more info on both matters? Many thanks --- On Mon, 30/3/09, Lyle Johnson <lyle at lylejohnson.name> wrote:> From: Lyle Johnson <lyle at lylejohnson.name> > Subject: Re: [fxruby-users] Data formating - Text Frame > To: fxruby-users at rubyforge.org > Date: Monday, 30 March, 2009, 1:15 PM > On Mar 30, 2009, at 4:55 AM, Stuart Clarke wrote: > > > Is there a way to say everything under heading A must > not exceed 75 chars giving a nice structured list in > columns. Each of my headings have set sizes but the text > frame is just a text frame. Is this something that would > need to be set in the array as the data is loaded into it? > Or is there something simple I can do in the GUI. > > It''s a combination of the two, sort of. You will > probably want to choose a fixed-width font for the FXText > widget, and then format the text (i.e. your data array) such > that each column''s content doesn''t exceed the width > of the headers. > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users
I have just noticed FXList and have added this to my GUI. It is possible to break my array down to fit into this list structure using appendItem? Many thanks Stuart --- On Mon, 30/3/09, Lyle Johnson <lyle at lylejohnson.name> wrote:> From: Lyle Johnson <lyle at lylejohnson.name> > Subject: Re: [fxruby-users] Data formating - Text Frame > To: fxruby-users at rubyforge.org > Date: Monday, 30 March, 2009, 1:15 PM > On Mar 30, 2009, at 4:55 AM, Stuart Clarke wrote: > > > Is there a way to say everything under heading A must > not exceed 75 chars giving a nice structured list in > columns. Each of my headings have set sizes but the text > frame is just a text frame. Is this something that would > need to be set in the array as the data is loaded into it? > Or is there something simple I can do in the GUI. > > It''s a combination of the two, sort of. You will > probably want to choose a fixed-width font for the FXText > widget, and then format the text (i.e. your data array) such > that each column''s content doesn''t exceed the width > of the headers. > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users
On Tue, Mar 31, 2009 at 10:18 AM, Stuart Clarke <stuart_clarke86 at yahoo.com> wrote:> I have just noticed FXList and have added this to my GUI. > It is possible to break my array down to fit into this list structure using appendItem?You are the only person who can answer this question. If you have a list of items that you''d like to display, so that the user can pick one or more items from that list, then yes, you might want to use FXList. Based on your earlier e-mail, it sort-of looked like you were trying to display tabular data (i.e. multiple rows and columns). If that''s the case, you might want to use FXTable instead.
I will explain a bit about how the program works. Using the GUI log files processed and line by line they are loaded into an array structure. I have broken this down into many array because one line that is pushed to the array as many pieces of data in it, below is an example line A B C D E F Now i have 6 different arrays, one a, one b and so on. I also have 6 different list areas on my GUI and I want my data to output to those lists, for example list[0].appendItem(arrayA) list[1].appendItem(arrayB) This however fails and gives a nasty error FYI before trying to append an item I call join("\n") on the data set and load the resulting data into a final array set which I want to add to the list. Does this make sense? Many thanks --- On Tue, 31/3/09, Lyle Johnson <lyle at lylejohnson.name> wrote:> From: Lyle Johnson <lyle at lylejohnson.name> > Subject: Re: [fxruby-users] Data formating - Text Frame > To: fxruby-users at rubyforge.org > Date: Tuesday, 31 March, 2009, 5:32 PM > On Tue, Mar 31, 2009 at 10:18 AM, Stuart Clarke > <stuart_clarke86 at yahoo.com> wrote: > > > I have just noticed FXList and have added this to my > GUI. > > It is possible to break my array down to fit into this > list structure using appendItem? > > You are the only person who can answer this question. If > you have a > list of items that you''d like to display, so that the > user can pick > one or more items from that list, then yes, you might want > to use > FXList. Based on your earlier e-mail, it sort-of looked > like you were > trying to display tabular data (i.e. multiple rows and > columns). If > that''s the case, you might want to use FXTable instead. > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users
I have output the data to the GUI. I have just one question. Can you turn of the individual scroll bars on each column and have just one scroll bar to control all of the columns? Many thanks --- On Tue, 31/3/09, Lyle Johnson <lyle at lylejohnson.name> wrote: From: Lyle Johnson <lyle at lylejohnson.name> Subject: Re: [fxruby-users] Data formating - Text Frame To: fxruby-users at rubyforge.org Date: Tuesday, 31 March, 2009, 5:32 PM On Tue, Mar 31, 2009 at 10:18 AM, Stuart Clarke <stuart_clarke86 at yahoo.com> wrote:> I have just noticed FXList and have added this to my GUI. > It is possible to break my array down to fit into this list structureusing appendItem? You are the only person who can answer this question. If you have a list of items that you''d like to display, so that the user can pick one or more items from that list, then yes, you might want to use FXList. Based on your earlier e-mail, it sort-of looked like you were trying to display tabular data (i.e. multiple rows and columns). If that''s the case, you might want to use FXTable instead. _______________________________________________ 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/20090401/9a2aa4fb/attachment-0001.html>