| View previous topic :: View next topic |
| Author |
Message |
xubo Guest
|
Posted: Mon Jun 20, 2005 7:56 am Post subject: How to dynamically change the Graphic User Interface? |
|
|
Hello:
I have an Form, within the Form, there is a TreeView which occupy the whole
client area(TreeView is added in design time). During the runtime, i would
like to add an Panel at the left side of TreeView with the same height of
TreeView, with 1/5 width of TreeView
How can i do it?
besides, i hope Panel size can be changed when Form side are changed.
Thanks a lot.
looking forward to you suggestion and hint.
|
|
| Back to top |
|
 |
Hans Galema Guest
|
Posted: Mon Jun 20, 2005 8:57 am Post subject: Re: How to dynamically change the Graphic User Interface? |
|
|
xubo wrote:
| Quote: | I have an Form, within the Form, there is a TreeView which occupy the whole
client area(TreeView is added in design time). During the runtime, i would
like to add an Panel at the left side of TreeView with the same height of
TreeView, with 1/5 width of TreeView
How can i do it?
|
TPanel *Panel = new TPanel ( this );
Panel->Width = TreeView1->Width / 5;
Panel->Align = alLeft;
Panel->Parent = this;
| Quote: | besides, i hope Panel size can be changed when Form side are changed.
|
Do you mean: it has to automatically adapt to the new formsize
but keep the 1/5 ?
Then place in the form OnResise event
Panel->Width = Width / 6;
Hans.
|
|
| Back to top |
|
 |
Hans Galema Guest
|
Posted: Mon Jun 20, 2005 8:59 am Post subject: Re: How to dynamically change the Graphic User Interface? |
|
|
Hans Galema wrote:
| Quote: | Then place in the form OnResize event
Panel->Width = Width / 6;
|
For that to work you have to care for a private Panel.
private:
TPanel *Panel;
Hans.
|
|
| Back to top |
|
 |
xubo Guest
|
Posted: Tue Jun 21, 2005 6:35 am Post subject: Re: How to dynamically change the Graphic User Interface? |
|
|
Thank you very much!
"Hans Galema" <notused (AT) notused (DOT) nl> ??????:42b68638 (AT) newsgroups (DOT) borland.com...
| Quote: | Hans Galema wrote:
Then place in the form OnResize event
Panel->Width = Width / 6;
For that to work you have to care for a private Panel.
private:
TPanel *Panel;
Hans.
|
|
|
| Back to top |
|
 |
Antreas7 Guest
|
Posted: Thu Jun 23, 2005 9:23 pm Post subject: Re: How to dynamically change the Graphic User Interface? |
|
|
xubo wrote:
| Quote: | Thank you very much!
"Hans Galema" <notused (AT) notused (DOT) nl> ??????:42b68638 (AT) newsgroups (DOT) borland.com...
Hans Galema wrote:
Then place in the form OnResize event
Panel->Width = Width / 6;
For that to work you have to care for a private Panel.
private:
TPanel *Panel;
Hans.
|
I used these function as you did and the popup menu worked fine.The
problem is that nothing is done when you click with the mouse an item of
the popup menu. How can i add the events on these items?
|
|
| Back to top |
|
 |
Antreas7 Guest
|
Posted: Thu Jun 23, 2005 9:26 pm Post subject: Re: How to dynamically change the Graphic User Interface? |
|
|
Sorry. Wrong question
|
|
| Back to top |
|
 |
|