fxruby-users Mailing List for FXRuby (Page 20)
Status: Inactive
Brought to you by:
lyle
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(75) |
Jul
(90) |
Aug
(61) |
Sep
(56) |
Oct
(56) |
Nov
(39) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(56) |
Feb
(45) |
Mar
(61) |
Apr
(40) |
May
(95) |
Jun
(79) |
Jul
(63) |
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
From: Carl Y. <ca...@yo...> - 2003-12-15 04:56:02
|
I'm having a problem getting my application to space things the way I want them. I basically have one horizontal frame that contains everything. Inside that I have left and right vertical frames. The left frame I want to contain an iconlist, and I want it take up most of the space. The right frame will contain a basic list with some buttons below it, and I only need it to be as wide as the widest item in the list. So I want it to be fairly narrow. The following code makes the right and left frames equal size, which scrunches the iconlist and gives way too much room to the right-hand list. However, when I try to remove the LAYOUT_FILL_X options from the right and left frames, the lists occupy the opposite edges and are very narrow, leaving a huge gap of nothing in the middle. I tried leaving the left frame set to LAYOUT_FILL_X and hard-coding the width of the right frame, but it seems to completely ignore my size settings and leave very little room for the right-hand frame. Any ideas? Thanks, Carl Here is the code: ---------------------------- contents = FXHorizontalFrame.new(self, LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0) leftframe = FXVerticalFrame.new(contents, LAYOUT_FILL_Y|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X, 0, 0, 0, 0, 0, 0, 0, 0) FXLabel.new(leftpane, "Transactions", nil, LAYOUT_FILL_X) # Transaction view window transframe = FXVerticalFrame.new(leftframe, FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_TOP|LAYOUT_LEFT, 0, 0, 0, 0, 0, 0, 0, 0) FXVerticalSeparator.new(contents, SEPARATOR_RIDGE|LAYOUT_FILL_Y) rightframe = FXVerticalFrame.new(contents, LAYOUT_TOP|LAYOUT_RIGHT, 0, 0, 150, 200, 0, 0, 0, 0) FXLabel.new(rightframe, "Categories", nil, LAYOUT_FILL_X) catlistframe = FXVerticalFrame.new(rightframe, FRAME_SUNKEN|FRAME_THICK|LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X, 0, 0, 0, 0, 0, 0, 0, 0) @catlist = FXList.new(catlistframe, 20, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y|LIST_SINGLESELECT) @catlist.appendItem("Text") @translist = FXIconList.new(transframe, nil, 0, LAYOUT_FILL_X|LAYOUT_FILL_Y|ICONLIST_BROWSESELECT) @translist.appendHeader("Date", nil, 75) @translist.appendHeader("Check", nil, 50) @translist.appendHeader("Amount", nil, 75) @translist.appendHeader("Payee", nil, 250) @translist.appendHeader("Category", nil, 150) @translist.appendHeader("Result", nil, 150) |
From: Sander J. <sa...@kn...> - 2003-12-15 04:06:05
|
No, Unless its absolutely necessary for your application to have things aligned right/center/left use the FXTable class, but I would advise against using that. FXIconList is much easier to work with and works for most cases. Also FXTable is still under construction and things like selecting whole rows you to implement yourself in callbacks from the table. Sander On Sunday 14 December 2003 09:10 pm, Carl Youngblood wrote: > > iconList.appendItem("#{theCustomer.name}\t#{theCustomer.address}\t#{theC > > ustomer.phone}", ...) > > Is there a way to specify whether a given column in the detail view is > left, right or center aligned? Or would this be a feature geared more > towards the FXTable class? -- "I've had a wonderful time, but this wasn't it." - Groucho Marx (1895-1977) |
From: Lyle J. <ly...@kn...> - 2003-12-15 03:17:50
|
On Dec 14, 2003, at 9:10 PM, Carl Youngblood wrote: > Is there a way to specify whether a given column in the detail view is > left, right or center aligned? Or would this be a feature geared more > towards the FXTable class? I think that you'll need to have to go to the FXTable to get this kind of control over the individual columns' text alignment. I don't see anything right offhand that lets you specify the individual columns' alignment for the icon list items. |
From: Carl Y. <ca...@yo...> - 2003-12-15 03:10:48
|
> > iconList.appendItem("#{theCustomer.name}\t#{theCustomer.address}\t#{theC > ustomer.phone}", ...) > Is there a way to specify whether a given column in the detail view is left, right or center aligned? Or would this be a feature geared more towards the FXTable class? |
From: Carl Y. <ca...@yo...> - 2003-12-15 03:06:34
|
That is exactly what I was looking for. Thanks for your prompt reply. I'm sure I could scour all over the web but I happen to be in a real big hurry, so I appreciate your answering the question in a little bit more detail. Hmm, setItemData... Working with this API reminds me a little bit of my MFC days... Carl Lyle Johnson wrote: > > On Dec 14, 2003, at 8:42 PM, Carl Youngblood wrote: > >> Never mind. I guess I need to call appendItem to add to the end of >> the list. But I'm still a little confused by setItemData. It takes >> two parameters, index and data. What does data contain and how do I >> set the values of multiply columns? > > > You can associate with each icon list item a reference to some other > Ruby object. Say for example that every row in the icon list > represents a customer, which is represented elsewhere in your > application by a Customer object. Then you can make this association > while you're creating its icon item, e.g. > > theCustomer = customerDatabase.getCustomer(...) > iconList.appendItem(theCustomer.name, bigIcon, miniIcon, theCustomer) > > You can change this association later using setItemData(), e.g. > > iconList.setItemData(itemIndex, someOtherCustomer) > > I'm not sure I understand the second part of your question ("... how > do I set the values of multiple columns?"). Each icon item (i.e. each > row in the list) can be displayed with multiple fields when the list > is configured in details mode. Those fields are specified as the > "text" of the icon item, and each field is separated by tabs. So for > example, if you wanted three columns (with the name, address and > phone number of the customer) you might do something like: > > > iconList.appendItem("#{theCustomer.name}\t#{theCustomer.address}\t#{theC > ustomer.phone}", ...) > > If this isn't what you were asking about, please let me know. > > Hope this helps, > > Lyle > > > |
From: Lyle J. <ly...@kn...> - 2003-12-15 02:52:02
|
On Dec 14, 2003, at 8:42 PM, Carl Youngblood wrote: > Never mind. I guess I need to call appendItem to add to the end of > the list. But I'm still a little confused by setItemData. It takes > two parameters, index and data. What does data contain and how do I > set the values of multiply columns? You can associate with each icon list item a reference to some other Ruby object. Say for example that every row in the icon list represents a customer, which is represented elsewhere in your application by a Customer object. Then you can make this association while you're creating its icon item, e.g. theCustomer = customerDatabase.getCustomer(...) iconList.appendItem(theCustomer.name, bigIcon, miniIcon, theCustomer) You can change this association later using setItemData(), e.g. iconList.setItemData(itemIndex, someOtherCustomer) I'm not sure I understand the second part of your question ("... how do I set the values of multiple columns?"). Each icon item (i.e. each row in the list) can be displayed with multiple fields when the list is configured in details mode. Those fields are specified as the "text" of the icon item, and each field is separated by tabs. So for example, if you wanted three columns (with the name, address and phone number of the customer) you might do something like: iconList.appendItem("#{theCustomer.name}\t#{theCustomer.address}\t#{theC ustomer.phone}", ...) If this isn't what you were asking about, please let me know. Hope this helps, Lyle |
From: Lyle J. <ly...@kn...> - 2003-12-15 02:43:59
|
On Dec 14, 2003, at 8:23 PM, Carl Youngblood wrote: > Is there a shortcut for inserting at the end of an iconlist, such as > > iconlist.insertItem(END, "Text to insert") A link to the online API documentation might be in order at this point ;) http://www.fxruby.org/doc/api/classes/Fox/FXIconList.html I think the method you're looking for is FXIconList#appendItem. |
From: Carl Y. <ca...@yo...> - 2003-12-15 02:42:56
|
Never mind. I guess I need to call appendItem to add to the end of the list. But I'm still a little confused by setItemData. It takes two parameters, index and data. What does data contain and how do I set the values of multiply columns? Thanks, Carl Carl Youngblood wrote: > Is there a shortcut for inserting at the end of an iconlist, such as > > iconlist.insertItem(END, "Text to insert") > > ? > > Thanks, > Carl > > Sander Jansen wrote: > >> Yes... unless you make a control somewhere, the user can never >> switch the view mode by himself. >> >> Sander >> >> On Sunday 14 December 2003 07:45 pm, Carl Youngblood wrote: >> >> >>> Thanks. The reason I shied away from FXIconList was that it said that >>> it could be toggled between three different viewing modes. As long as >>> I can keep the user from toggling into the other two modes this sounds >>> like it will work fine. Is this the case? >>> >>> Thanks, >>> Carl >>> >>> Sander Jansen wrote: >>> >>> >>>> You're looking for FXIconList which has a detailed mode, that exactly >>>> looks like the one in the screenshot. >>>> >>>> Sander >>>> >>>> On Sunday 14 December 2003 07:39 pm, Carl Youngblood wrote: >>>> >>>> >>>>> Hello, >>>>> >>>>> I'm trying to create a control like this: >>>>> >>>>> http://fox-toolkit.org/screenshots/ss2.png >>>>> >>>>> Is there a built-in class for this type of control or must I do some >>>>> modifications to the FXHeader class. The FXHeader example on the >>>>> FXRuby >>>>> web site doesn't give you a unified list that highlights all the way >>>>> across the view. Each column gets highlighted separately. >>>>> >>>>> Thanks for your time. >>>>> >>>>> Carl Youngblood >>>>> >>>> >> >> >> |
From: Carl Y. <ca...@yo...> - 2003-12-15 02:23:47
|
Is there a shortcut for inserting at the end of an iconlist, such as iconlist.insertItem(END, "Text to insert") ? Thanks, Carl Sander Jansen wrote: >Yes... unless you make a control somewhere, the user can never switch the >view mode by himself. > > Sander > >On Sunday 14 December 2003 07:45 pm, Carl Youngblood wrote: > > >>Thanks. The reason I shied away from FXIconList was that it said that >>it could be toggled between three different viewing modes. As long as >>I can keep the user from toggling into the other two modes this sounds >>like it will work fine. Is this the case? >> >>Thanks, >>Carl >> >>Sander Jansen wrote: >> >> >>>You're looking for FXIconList which has a detailed mode, that exactly >>>looks like the one in the screenshot. >>> >>> Sander >>> >>>On Sunday 14 December 2003 07:39 pm, Carl Youngblood wrote: >>> >>> >>>>Hello, >>>> >>>>I'm trying to create a control like this: >>>> >>>>http://fox-toolkit.org/screenshots/ss2.png >>>> >>>>Is there a built-in class for this type of control or must I do some >>>>modifications to the FXHeader class. The FXHeader example on the FXRuby >>>>web site doesn't give you a unified list that highlights all the way >>>>across the view. Each column gets highlighted separately. >>>> >>>>Thanks for your time. >>>> >>>>Carl Youngblood >>>> >>>> > > > |
From: Sander J. <sa...@kn...> - 2003-12-15 01:53:28
|
Yes... unless you make a control somewhere, the user can never switch the view mode by himself. Sander On Sunday 14 December 2003 07:45 pm, Carl Youngblood wrote: > Thanks. The reason I shied away from FXIconList was that it said that > it could be toggled between three different viewing modes. As long as > I can keep the user from toggling into the other two modes this sounds > like it will work fine. Is this the case? > > Thanks, > Carl > > Sander Jansen wrote: > >You're looking for FXIconList which has a detailed mode, that exactly > > looks like the one in the screenshot. > > > > Sander > > > >On Sunday 14 December 2003 07:39 pm, Carl Youngblood wrote: > >>Hello, > >> > >>I'm trying to create a control like this: > >> > >>http://fox-toolkit.org/screenshots/ss2.png > >> > >>Is there a built-in class for this type of control or must I do some > >>modifications to the FXHeader class. The FXHeader example on the FXRuby > >>web site doesn't give you a unified list that highlights all the way > >>across the view. Each column gets highlighted separately. > >> > >>Thanks for your time. > >> > >>Carl Youngblood -- "I've had a wonderful time, but this wasn't it." - Groucho Marx (1895-1977) |
From: Carl Y. <ca...@yo...> - 2003-12-15 01:46:06
|
Thanks. The reason I shied away from FXIconList was that it said that it could be toggled between three different viewing modes. As long as I can keep the user from toggling into the other two modes this sounds like it will work fine. Is this the case? Thanks, Carl Sander Jansen wrote: >You're looking for FXIconList which has a detailed mode, that exactly looks >like the one in the screenshot. > > Sander > >On Sunday 14 December 2003 07:39 pm, Carl Youngblood wrote: > > >>Hello, >> >>I'm trying to create a control like this: >> >>http://fox-toolkit.org/screenshots/ss2.png >> >>Is there a built-in class for this type of control or must I do some >>modifications to the FXHeader class. The FXHeader example on the FXRuby >>web site doesn't give you a unified list that highlights all the way >>across the view. Each column gets highlighted separately. >> >>Thanks for your time. >> >>Carl Youngblood >> >> > > > |
From: Sander J. <sa...@kn...> - 2003-12-15 01:42:30
|
You're looking for FXIconList which has a detailed mode, that exactly looks like the one in the screenshot. Sander On Sunday 14 December 2003 07:39 pm, Carl Youngblood wrote: > Hello, > > I'm trying to create a control like this: > > http://fox-toolkit.org/screenshots/ss2.png > > Is there a built-in class for this type of control or must I do some > modifications to the FXHeader class. The FXHeader example on the FXRuby > web site doesn't give you a unified list that highlights all the way > across the view. Each column gets highlighted separately. > > Thanks for your time. > > Carl Youngblood -- "I've had a wonderful time, but this wasn't it." - Groucho Marx (1895-1977) |
From: Carl Y. <ca...@yo...> - 2003-12-15 01:39:42
|
Hello, I'm trying to create a control like this: http://fox-toolkit.org/screenshots/ss2.png Is there a built-in class for this type of control or must I do some modifications to the FXHeader class. The FXHeader example on the FXRuby web site doesn't give you a unified list that highlights all the way across the view. Each column gets highlighted separately. Thanks for your time. Carl Youngblood |
From: Brett S H. <dra...@im...> - 2003-12-13 08:53:47
|
Hi All, I have just placed a small RUBY/FXRuby tool onto rubyforge. Called RubyFXGen it uses a small scripting 'kanguage' FFDL to describe your forms layout rather than using QT ot FOX-Tool. Its still being worked on but it is very easy (I think) to expand upon. Yours, Brett |
From: Cribbs, J. <Jam...@oa...> - 2003-12-12 21:16:54
|
Emmanuel Touzery wrote: > Hello, > > PS: advantages of using fxruby with exerb are numerous: simple > installation, and even more: transparent upgrade from eg ruby 1.6 to > 1.8 without the client noticing. I would also like to recommend rubyscript2exe. It does something similar to exerb. I have used it with to create an exe for an fxruby script with good results. Use it with UPX and you can get fairly small executables. Jamey Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. If you are not the intended recipient(s), you are hereby notified that any dissemination, unauthorized review, use, disclosure or distribution of this email and any materials contained in any attachments is prohibited. If you receive this message in error, or are not the intended recipient(s), please immediately notify the sender by email and destroy all copies of the original message, including attachments. |
From: Emmanuel T. <emm...@wa...> - 2003-12-11 13:47:26
|
Takashi & Kayoko Sano wrote: >Hi Emmanuel, > >Emmanuel Touzery <emm...@wa...> wrote: > > >>but i still have a question: even though the original file was . >>rbw (to >>avoid opening of an output text window) the result binary does >>open a >>DOS console when run. any way to disable that? >> >> > >You need to specify the ruby core file for GUI. exerb has two >variations of ruby core files, one is for cui such as >ruby168c.rbx and the other is for gui such as ruby168g.rbx. >You have to specify a core file ending with "g" in your recipe >file. > > wonderful... thank you very much. exerb is really very very impressive stuff. plus, now i can finally dump ruby 1.6 and ship binaries based on 1.8 :O) emmanuel |
From: Takashi & K. S. <tk...@m3...> - 2003-12-11 13:42:51
|
Hi Emmanuel, Emmanuel Touzery <emm...@wa...> wrote: > but i still have a question: even though the original file was . > rbw (to > avoid opening of an output text window) the result binary does > open a > DOS console when run. any way to disable that? You need to specify the ruby core file for GUI. exerb has two variations of ruby core files, one is for cui such as ruby168c.rbx and the other is for gui such as ruby168g.rbx. You have to specify a core file ending with "g" in your recipe file. Takashi Sano |
From: Emmanuel T. <emm...@wa...> - 2003-12-11 13:23:47
|
Lyle Johnson wrote: > I haven't tried this lately, but it used to work (with earlier > versions of exerb). If you try it and actually run into problems, > please let us know. For that matter, if you try it and it works fine, > let us know that too ;) WOW. sorry for the dumb questions... i just tried, it worked perfect the first time... i would never think it was so easy. i was sure there was some black magic involved... but i still have a question: even though the original file was .rbw (to avoid opening of an output text window) the result binary does open a DOS console when run. any way to disable that? otherwise the resulting binary is ~5Mb (ruby 1.6). that's a lot, but that'll do. Zipped it's 1.5Mb. So, great! Then, the only problem left is the DOS console... emmanuel |
From: Lyle J. <ly...@kn...> - 2003-12-11 13:10:40
|
On Dec 11, 2003, at 2:50 AM, Emmanuel Touzery wrote: > I was wondering if there is support for the combination > ruby+fxruby+fox as exerb script? I've had success with ruby+exerb, > with a filesize of the binary of ~400k + my script size (plus size of > standard library files i'm using, eg find.rb). > Is it possible to get a single .exe or an .exe with DLLs and > distribute a FXRuby application like this? If yes, what is then the > size of the .exe file and related DLLs you have to ship? I haven't tried this lately, but it used to work (with earlier versions of exerb). If you try it and actually run into problems, please let us know. For that matter, if you try it and it works fine, let us know that too ;) |
From: Emmanuel T. <emm...@wa...> - 2003-12-11 13:04:43
|
meinrad recheis wrote: > Emmanuel Touzery wrote: > >> Hello, >> >> I was wondering if there is support for the combination >> ruby+fxruby+fox as exerb script? I've had success with ruby+exerb, >> with a filesize of the binary of ~400k + my script size (plus size of >> standard library files i'm using, eg find.rb). > > > hi, i am using fxruby with exerb without any problems and got > filesizes of about 1.2 mb. > great! how did you do it? can you send me a .rbc recipe? Is it like: the recipe includes the .rb files of FXruby, and you ship extra the DLLs of FOX? it just seems very complicated from here because it's nowhere written how to do it. i actually thought it was not possible.. emmanuel |
From: meinrad r. <mei...@gm...> - 2003-12-11 12:51:39
|
Emmanuel Touzery wrote: > Hello, > > I was wondering if there is support for the combination > ruby+fxruby+fox as exerb script? I've had success with ruby+exerb, with > a filesize of the binary of ~400k + my script size (plus size of > standard library files i'm using, eg find.rb). > Is it possible to get a single .exe or an .exe with DLLs and > distribute a FXRuby application like this? If yes, what is then the size > of the .exe file and related DLLs you have to ship? > > Figuring it should be a common question, i searched for quite a while > for this, without clear answer on the net... > > thank you for any help. > > emmanuel > > PS: advantages of using fxruby with exerb are numerous: simple > installation, and even more: transparent upgrade from eg ruby 1.6 to 1.8 > without the client noticing. > hi, i am using fxruby with exerb without any problems and got filesizes of about 1.2 mb. |
From: Emmanuel T. <emm...@wa...> - 2003-12-11 08:50:22
|
Emmanuel Touzery wrote: > > PS: advantages of using fxruby with exerb are numerous: simple > installation, and even more: transparent upgrade from eg ruby 1.6 to > 1.8 without the client noticing. (or upgrade of fxruby versions etc) |
From: Emmanuel T. <emm...@wa...> - 2003-12-11 08:47:40
|
Hello, I was wondering if there is support for the combination ruby+fxruby+fox as exerb script? I've had success with ruby+exerb, with a filesize of the binary of ~400k + my script size (plus size of standard library files i'm using, eg find.rb). Is it possible to get a single .exe or an .exe with DLLs and distribute a FXRuby application like this? If yes, what is then the size of the .exe file and related DLLs you have to ship? Figuring it should be a common question, i searched for quite a while for this, without clear answer on the net... thank you for any help. emmanuel PS: advantages of using fxruby with exerb are numerous: simple installation, and even more: transparent upgrade from eg ruby 1.6 to 1.8 without the client noticing. |
From: Joel V. <vj...@PA...> - 2003-12-11 04:39:47
|
Joel VanderWerf wrote: > Will Merrell wrote: > >> In the Observable library that you wrote there are cancel_when_* methods >> that do this job, what are the equivilent methods for Foxtails? > > > That's a good question. I think it can be done with the latest versions > of Observable and FoxTails, and I will come up with a simple example... > Short answer: use #retarget. This is a method of all the FTTargeted widgets. Sorry about the docs... Long answer below. This will be in the examples dir in the next FoxTails release. ==== disconnect.rb ==== #!/usr/bin/env ruby require 'foxtails' include Fox include FoxTails class MainWindow < FXMainWindow observable :data, :t2, :t3 def initialize(*args) super self.t2 = true self.t3 = true frame = FXVerticalFrame.new(self) f1 = FXHorizontalFrame.new(self) FXLabel.new(f1, "One", nil, LAYOUT_FIX_WIDTH).width = 50 @text1 = FTTextField.new(f1, 60, self, :data) @text1.dynamic = true f2 = FXHorizontalFrame.new(self) FXLabel.new(f2, "Two", nil, LAYOUT_FIX_WIDTH).width = 50 @text2 = FTTextField.new(f2, 60, self, :data) @text2.dynamic = true @check2 = FTCheckButton.new(f2, "connected to One", self, :t2) when_t2 CHANGES do |val| @text2.retarget(val ? self : nil) end f3 = FXHorizontalFrame.new(self) FXLabel.new(f3, "Three", nil, LAYOUT_FIX_WIDTH).width = 50 @text3 = FTTextField.new(f3, 60, self, :data) @text3.dynamic = true @check3 = FTCheckButton.new(f3, "connected to One", self, :t3) when_t3 CHANGES do |val| @text3.retarget(val ? self : nil) end end def create super show(PLACEMENT_OWNER) end end class TestApp < FTApp def initialize super("Test", "TEST") MainWindow.new(self, "Test") end end TestApp.new.run |
From: Joel V. <vj...@PA...> - 2003-12-11 04:16:44
|
Will Merrell wrote: > In the Observable library that you wrote there are cancel_when_* methods > that do this job, what are the equivilent methods for Foxtails? That's a good question. I think it can be done with the latest versions of Observable and FoxTails, and I will come up with a simple example... -- Joel VanderWerf California PATH, UC Berkeley mailto:vj...@pa... Ph. (510) 231-9446 http://www.path.berkeley.edu FAX (510) 231-9565 |