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 » U++ Widgets - General questions or Mixed problems » easiest way to convert a Topwindow into a control
Re: easiest way to convert a Topwindow into a control [message #6034 is a reply to message #6022] Sun, 29 October 2006 04:22 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14261
Registered: November 2005
Ultimate Member
yeus wrote on Sat, 28 October 2006 14:06


After a while (now) it turned out that this window would also make a very nice control element for a window of another application I'm, working on.



Depends on how much clean solution you need.

First of all, despite being derived from TopWindow, you can still use such class as child Ctrl.

OTOH, usually it is very simple to combine child Ctrl with TopWindow (MyCtrl c; TopWindow win; win.Add(c.SizePos()).

Sometimes an interesting solution is to add TopWindow as Ctrl's option - at first, it might look a little bit strange (because C++ and GUI containment are reversed):

class MyCtrl {
...
   TopWindow win;

   void OpenAsWindow() {
      win.Add(this->SizePos());
      win.Open();
   }
};


Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Promlem with ColumnList::SetDisplay()
Next Topic: run function from user control to other control
Goto Forum:
  


Current Time: Sun Jun 08 13:38:31 CEST 2025

Total time taken to generate the page: 0.04010 seconds