|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
How to Get A SubWindow to showHi there,
I am using fxruby, but should be the same. I am having the hardest time figuring out how subwindows (forms) are done in FOX. Is it solely through a FXPopup ? Ie. In Visual C#, you can just instantiate a "Form" and load it with your GUI widgets. Then "Form".show() it from your main Form. What is the equivalent in FOX? Is FXPopup == a Form ? In particular, I just want to display a PNG in a subwindow once the user clicks a button. The code I have is: def onBtnClick(sender, sel, ptr) pane = FXPopup.new(@mainWindow) # now load the generated image # Make image widget @imageview = FXImageView.new(pane, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y|HSCROLLER_NEVER|VSCROLLER_NEVER) img = FXPNGImage.new(@mainWindow.getApp(), nil, IMAGE_KEEP|IMAGE_SHMI|IMAGE_SHMP) # Load it... @mainWindow.getApp().beginWaitCursor do FXFileStream.open(filename, FXStreamLoad) { |stream| img.loadPixels(stream) } img.create @imageview.image = img end # Make popup pane.create pane.popup(nil, 0,0) @mainWindow.getApp().runModalWhileShown(pane) end Thank you for any help! Regards, just another student ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Foxgui-users mailing list Foxgui-users@... https://lists.sourceforge.net/lists/listinfo/foxgui-users |
|
|
Re: How to Get A SubWindow to showOn Friday 28 August 2009, Turd Turtle wrote:
> Hi there, > > I am using fxruby, but should be the same. > > I am having the hardest time figuring out how subwindows (forms) are done in > FOX. > > Is it solely through a FXPopup ? FXPopup is meant for popup menus. I think you're looking for FXDialogBox. An FXDialogBox can be either free floating, or constrained to be on top of some other window. The free-floating variety has FXApp as its "parent" while the other one has the given window as its "parent". It is customary to have the latter type be "modal" i.e. interactions with other windows are blocked while the dialog is up. If you call the dialog's "execute()" method then it will be a modal one. For a non-modal one, you just call "show()" to display it. Hope this helps, - Jeroen -- +----------------------------------------------------------------------------+ | Copyright (C) 08:10 08/28/2009 Jeroen van der Zijp. All Rights Reserved. | +----------------------------------------------------------------------------+ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Foxgui-users mailing list Foxgui-users@... https://lists.sourceforge.net/lists/listinfo/foxgui-users |
|
|
|
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |