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++ TheIDE » U++ TheIDE: Layout (Forms) Designer » Looking for a Panel Ctrl...
Looking for a Panel Ctrl... [message #12986] Mon, 03 December 2007 11:03 Go to next message
alex100 is currently offline  alex100
Messages: 118
Registered: November 2007
Experienced Member
Is there any kind of panel Ctrl?

What I need ia a panel (container) to put other Ctrls, and, for instanbce, If we desable the panel all child Ctrls become dasable too. If we move the panel all child Ctrl are moved too.

Is there any Ctrl that makes this in Ultimate ++?

Thanks

Alex
Re: Looking for a Panel Ctrl... [message #12987 is a reply to message #12986] Mon, 03 December 2007 11:44 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Well it's quite easy to implement Smile
class PanelCtrl : public Ctrl
{
   void Enable(bool b)
   {
	Ctrl * ctrl = GetFirstChild();
	while(ctrl)
	{
            ctrl->Enable(b);
	    ctrl = ctrl->GetNext();
	}
   }
};

PanelCtrl panel;
panel.Add(droplist0);
panel.Add(droplist1);
panel.Enable(false);

Bad news is layout editor dosn't support visualisation of child<->parent relation, so you must add all control to panel manually.
Re: Looking for a Panel Ctrl... [message #12988 is a reply to message #12987] Mon, 03 December 2007 13:37 Go to previous messageGo to next message
alex100 is currently offline  alex100
Messages: 118
Registered: November 2007
Experienced Member
Ok, I got it now...

No problem, I daa the controls by hand!

Thank you very much!

Alex
Re: Looking for a Panel Ctrl... [message #12989 is a reply to message #12987] Mon, 03 December 2007 13:46 Go to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Quote:

No problem, I daa the controls by hand!

You can still use a layout.

Create a new layout (ie. PanelLayout) then
WithPanelLayout<PanelCtrl> panel;
...
CtrlLayout(panel);

This will work best if PanelCtrl inherits from ParentCtrl rather than Ctrl.
Previous Topic: Toggle button
Next Topic: Can't use mutators of custom widgets in Layout Designer
Goto Forum:
  


Current Time: Tue Mar 19 03:58:42 CET 2024

Total time taken to generate the page: 0.01171 seconds