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 » Community » Newbie corner » Is their a way to have code execute if the window size is changed?
Is their a way to have code execute if the window size is changed? [message #33227] Sun, 17 July 2011 18:11 Go to next message
silverx is currently offline  silverx
Messages: 62
Registered: March 2011
Member
I am looking to have some code executed when someone changes the window size, either my min/max, or drag on the window with sizeable, and zoomable?

Like a callback, is there anyway to do this using what is there already and not building my own window?

Thanks
David
Re: Is their a way to have code execute if the window size is changed? [message #33228 is a reply to message #33227] Sun, 17 July 2011 23:10 Go to previous message
BioBytes is currently offline  BioBytes
Messages: 307
Registered: October 2008
Location: France
Senior Member
Hi silverx Smile ,

Overload the virtual method Layout() from Ctrl and Topwindow objects.

In the header file, make the following statement:

class myWindow : public WithmyWindowLayout<TopWindow> {
typedef myWindow CLASSNAME;

public:

myWindow();

private:
virtual void Layout();

};



in the cpp file, you can insert instructions to be executed while the window layout is modified if the user resizes it or when the window is displayed.

void myWindow()::Layout()
{
//Some code you wish

TopWindow::Layout(); //call to ancestor method
}


Hoping this could help you

Kind regards
Biobytes
Previous Topic: How to access sub window information in other functions?
Next Topic: Pick semantic errors
Goto Forum:
  


Current Time: Thu Apr 25 13:40:20 CEST 2024

Total time taken to generate the page: 0.01367 seconds