 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Igor Guest
|
Posted: Mon Nov 27, 2006 12:49 am Post subject: Delphi 1.6 GUI positioning |
|
|
Hello,
i am quite new to Delphi programming. I was programming in Java, .NET
and C++, but now we are working on an application, that has to be
written in Delphi 1.6.
I have a GUI connected question and I can't find any answer to it.
I have a GUI with two buttons and a memo.
-------------------------------------------
- -
- ##################################### -
- # # -
- # MEMO # -
- # # -
- ##################################### -
- -
- -
- BUTTON1 BUTTON2 -
-------------------------------------------
When I maximize the form, Memo doesn't maximize too. Also the buttons
position remains the same (absolute). I want the Memo to maximize and
buttons to stay under the Memo corners.
Can someone please give me a tip how to di this.
Thanks. |
|
| Back to top |
|
 |
Rudy Velthuis [TeamB] Guest
|
Posted: Mon Nov 27, 2006 1:30 am Post subject: Re: Delphi 1.6 GUI positioning |
|
|
At 19:49:34, 26.11.2006, Igor wrote:
| Quote: | Hello,
i am quite new to Delphi programming. I was programming in Java, .NET
and C++, but now we are working on an application, that has to be
written in Delphi 1.6.
|
There is no Delphi 1.6, and has never been.
If you mean Delphi 6, then use anchors. Set the Anchors for the memo to
true,true,true,true and the one for button 1 to true,false,false,true and
button2 to false,false,true,true.
--
Rudy Velthuis [TeamB] http://rvelthuis.de/
"One morning I shot a bear in my pajamas. How it got into my
pajamas I'll never know."
-- Groucho Marx |
|
| Back to top |
|
 |
Nils Haeck Guest
|
Posted: Mon Nov 27, 2006 2:00 am Post subject: Re: Delphi 1.6 GUI positioning |
|
|
I'm afraid there's no Delphi 1.6, perhaps the ad said Delphi 1.. 6? (meaning
one of the versions of Delphi from 1 through 6)?
For your problem, look at the Anchors property that is available for each of
the controls.
Set the memo to [akLeft, akTop, akRight, akBottom]
Set the buttons to [akLeft, akBottom]
Nils
"Igor" <igor.pernek (AT) gmail (DOT) com> schreef in bericht
news:1164566974.854873.277560 (AT) n67g2000cwd (DOT) googlegroups.com...
| Quote: | Hello,
i am quite new to Delphi programming. I was programming in Java, .NET
and C++, but now we are working on an application, that has to be
written in Delphi 1.6.
I have a GUI connected question and I can't find any answer to it.
I have a GUI with two buttons and a memo.
-------------------------------------------
- -
- ##################################### -
- # # -
- # MEMO # -
- # # -
- ##################################### -
- -
- -
- BUTTON1 BUTTON2 -
-------------------------------------------
When I maximize the form, Memo doesn't maximize too. Also the buttons
position remains the same (absolute). I want the Memo to maximize and
buttons to stay under the Memo corners.
Can someone please give me a tip how to di this.
Thanks.
|
|
|
| Back to top |
|
 |
Igor Guest
|
Posted: Mon Nov 27, 2006 3:29 am Post subject: Re: Delphi 1.0 GUI positioning |
|
|
sorry,
I meant delphi 1.0. Not sure where i have seen 1.6. :)
There is no Anchor property in Delphi 1.0. Can I use some alternatives?
Thanks for your answers.
Rudy Velthuis [TeamB] je napisal:
| Quote: | At 19:49:34, 26.11.2006, Igor wrote:
Hello,
i am quite new to Delphi programming. I was programming in Java, .NET
and C++, but now we are working on an application, that has to be
written in Delphi 1.6.
There is no Delphi 1.6, and has never been.
If you mean Delphi 6, then use anchors. Set the Anchors for the memo to
true,true,true,true and the one for button 1 to true,false,false,true and
button2 to false,false,true,true.
--
Rudy Velthuis [TeamB] http://rvelthuis.de/
"One morning I shot a bear in my pajamas. How it got into my
pajamas I'll never know."
-- Groucho Marx |
|
|
| Back to top |
|
 |
Rudy Velthuis [TeamB] Guest
|
Posted: Mon Nov 27, 2006 3:46 am Post subject: Re: Delphi 1.0 GUI positioning |
|
|
At 22:29:52, 26.11.2006, Igor wrote:
| Quote: | sorry,
I meant delphi 1.0. Not sure where i have seen 1.6. :)
There is no Anchor property in Delphi 1.0. Can I use some alternatives?
|
Then, you can only fill your form with panels that have align set to
several options, like alLeft, alClient, etc. and put each of the
components on one of them. Be a bit creative, i.e. something like:
+---------------------------------------------------------------+
| alTop |
+--+---------------------------------------------------------+--+
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| a| alClient | a|
| l| | l|
| L| MEMO | R|
| e| | i|
| f| | g|
| t| | h|
| | | t|
| | | |
| | | |
| | alBottom | |
| |+-------------------------v-----------------------------+| |
| ||+--------------------------++-------------------------+|| |
| ||| alClient || alRight ||| |
| ||| BUTTON1 || BUTTON2 ||| |
| ||+--------------------------++-------------------------+|| |
| |+-------------------------------------------------------+| |
+--+---------------------------------------------------------+--+
| alBottom |
+---------------------------------------------------------------+
Be sure to remove the bevels and captions of all panels, and it might
look good.
Another way to handle this is to intercept the resize messages, and move
your components accordingly. That may be cleaner (it does not require a
lot of panels, where each panel requires a window handle), but a little
more programming work.
--
Rudy Velthuis [TeamB] http://rvelthuis.de/
"Why don't they make the whole plane out of that black box stuff."
-- Steven Wright. |
|
| Back to top |
|
 |
Reiner Guest
|
Posted: Tue Nov 28, 2006 6:55 am Post subject: Re: Delphi 1.0 GUI positioning |
|
|
"Igor" <igor.pernek (AT) gmail (DOT) com> wrote in message
news:1164576592.877190.57540 (AT) l12g2000cwl (DOT) googlegroups.com...
| Quote: | I meant delphi 1.0. Not sure where i have seen 1.6.
|
Is there any reason you are using D1? You can download the current Turbo
Delphi for free.
http://www.turboexplorer.com/ |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|