Home » U++ Library support » Splitter » add controls to splitter bar, how? [NEEDS MORE IMPLEMENTATION...]
Re: add controls to splitter bar, how? [message #1958 is a reply to message #1889] |
Tue, 28 March 2006 20:43 |
|
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
improved example which works if you make Splitter::PosToClient() public... or add that piece of code instead ...
#include <CtrlLib/CtrlLib.h>
class App : public TopWindow {
LineEdit ed1,ed2;
Splitter horz;
Option btn;
public:
typedef App CLASSNAME;
void MoveSplitter();
App();
};
void App::MoveSplitter(){
if (btn.Get())
horz.SetPos(1000);
else horz.SetPos(5000);
btn.SetRectX( horz.PosToClient(horz.GetPos(0))-7, 15 );
}
App::App(){
horz.Add(ed1);
horz.Add(ed2);
Add(horz.Horz().VSizePos(35,35));
Add(btn);
SetRect(20,30,950,720); //can't leave without it because you will not get Pos's...
btn.SetRectX( horz.PosToClient(horz.GetPos(0))-7, 15 ); //have to make Splitter::PosToClient() public... :(
btn.SetRectY(50,50);
btn.WhenAction=THISBACK(MoveSplitter);
Sizeable().Zoomable();
}
GUI_APP_MAIN
{
App().Run();
}
Now the problem is how to keep the "switcher" in place when resizing parent Ctrl's...?
[Updated on: Tue, 28 March 2006 20:44] Report message to a moderator
|
|
|
|
|
add controls to splitter bar, how? [NEEDS MORE IMPLEMENTATION...]
By: fudadmin on Fri, 24 March 2006 14:37
|
|
|
Re: add controls to splitter bar, how?
By: mirek on Fri, 24 March 2006 14:57
|
|
|
Re: add controls to splitter bar, how?
By: fudadmin on Fri, 24 March 2006 15:16
|
|
|
Re: add controls to splitter bar, how?
By: fudadmin on Fri, 24 March 2006 15:31
|
|
|
Re: add controls to splitter bar, how?
By: fudadmin on Fri, 24 March 2006 17:58
|
|
|
Re: add controls to splitter bar, how?
By: mirek on Fri, 24 March 2006 23:01
|
|
|
Re: add controls to splitter bar, how?
By: fudadmin on Tue, 28 March 2006 20:43
|
|
|
Re: add controls to splitter bar, how?
By: mirek on Tue, 28 March 2006 21:44
|
|
|
Re: add controls to splitter bar, how?
By: fudadmin on Tue, 28 March 2006 23:44
|
|
|
Re: add controls to splitter bar, how?
By: fudadmin on Tue, 28 March 2006 23:59
|
|
|
Re: add controls to splitter bar, how?
By: mirek on Fri, 24 March 2006 22:54
|
Goto Forum:
Current Time: Fri Mar 29 08:37:31 CET 2024
Total time taken to generate the page: 0.01071 seconds
|