Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TopWindow&PopUp, TrayIcon » Toolbox inside a TopWindow
Re: Toolbox inside a TopWindow [message #13889 is a reply to message #13887] Thu, 31 January 2008 11:25 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
The major problem with the code you posted is that you are trying to open the tool window in the constructor of the main window. This doesn't work because at that point the main window hasn't been opened yet.

A better solution is to add this function to the main window:
Quote:

virtual void State(int reason) {
if (reason == Ctrl::OPEN) {
toolWnd.SetRect(Rect(0, 0, 140, 200));
toolWnd.ToolWindow().Open(this);
toolWmd.CenterOwner();
}
}


However, if you want the window to be resticted to the borders of the main window it is a different problem, more like MDI. There is no intrinsic way of doing this in Upp, though you can imitate it using a normal ctrl with a 'fake' window frame.
 
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problems with CursorImage/Popups/Frames on X11
Next Topic: Linux TrayIcon menu improvement
Goto Forum:
  


Current Time: Sat Jun 07 19:24:16 CEST 2025

Total time taken to generate the page: 0.05270 seconds