News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Subwindows
Author Message
chrimo
Member
***


Posts: 94
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #1
Subwindows

Hi,
please can somebody tell me, how to create subwindows inside a mainwindows ?

Code:
window = fltk:Fl_Double_Window(MaxWinSizeX, MaxWinSizeY, "NXTLuaSim");
window:tooltip("NXT Lua Sim by Chrimo and friends "..version);
window:color(55);
window:align(fltk.FL_ALIGN_CENTER);
window:position(10,10);

subwindow = fltk:Fl_Window(X, Y, "NXT");
subwindow:tooltip("NXT Lua Sim by Chrimo and friends "..version);
subwindow:color(55);
subwindow:position(0,0);


Subwindows should be located inside the main window and have own coordinates...
Where is the reference or assignment to main window
Any idea ?
Thanks for supporting a rookie
Bye
Christian

06-07-2007 01:14 AM
Find all posts by this user Quote this message in a reply
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #2
RE: Subwindows

I haven't done anything with embedded windows, but this seems to work:

Code:
ww=300; wh=180
w = fltk:Fl_Window(ww,wh,"Hello")
w2 = fltk:Fl_Window(ww/2,wh/2,"Hello x2"); w2:box(fltk.FL_UP_BOX)
w:add(w2)  -- <---this is the important part
w:show(); w2:show()
Fl:run()

06-07-2007 02:45 AM
Find all posts by this user Quote this message in a reply
chrimo
Member
***


Posts: 94
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #3
RE: Subwindows

mikshaw Wrote:
I haven't done anything with embedded windows, but this seems to work:

Code:
ww=300; wh=180
w = fltk:Fl_Window(ww,wh,"Hello")
w2 = fltk:Fl_Window(ww/2,wh/2,"Hello x2"); w2:box(fltk.FL_UP_BOX)
w:add(w2)  -- <---this is the important part
w:show(); w2:show()
Fl:run()


Much easier as I thought Big Grin

Code:
subwindow = fltk:Fl_Window(X, Y, "NXT");
subwindow:tooltip("NXT Lua Sim by Chrimo and friends "..version);
subwindow:color(55);
subwindow:position(0,0);
subwindow:parent(window) --- <==== ADDED reference to main window


Cool staff
Looking at the FLTK-Sources and Demos helps very much ;-)
Thanks
Bye
Christian

This post was last modified: 06-07-2007 03:22 AM by chrimo.

06-07-2007 03:20 AM
Find all posts by this user Quote this message in a reply
chrimo
Member
***


Posts: 94
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #4
RE: Subwindows

Bad news
it didn't work at MacOSX 10.4.9 (tested with PPC and Intel)
Subwindows are not visible at the main window.
Windows XP SP2 works.
This needs some more investigations
Christian

window:add(subwindow) has the same problem

This post was last modified: 06-07-2007 06:13 AM by chrimo.

06-07-2007 04:47 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: