 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
gif Guest
|
Posted: Thu Nov 20, 2003 5:18 pm Post subject: Anchors [akLeft,akTop,akRight,akBottom] |
|
|
i have a panel, with assigned akLeft and akTop at hte anchor propriety.
i want via code also ak Bottom, how?
Panel->Anchors......?
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Thu Nov 20, 2003 6:18 pm Post subject: Re: Anchors [akLeft,akTop,akRight,akBottom] |
|
|
"gif" <jeyweb (AT) yahoo (DOT) it> wrote
| Quote: | i want via code also ak Bottom, how?
|
Anchors is a Set. Like any other Set, use the '<<' operator to include new
values, ie:
Panel->Anchors = Panel->Anchors << akBottom;
Gambit
|
|
| Back to top |
|
 |
Jonathan Arnold Guest
|
Posted: Thu Nov 20, 2003 7:09 pm Post subject: Re: Anchors [akLeft,akTop,akRight,akBottom] |
|
|
Remy Lebeau (TeamB) wrote:
| Quote: | "gif" <jeyweb (AT) yahoo (DOT) it> wrote in message
news:3fbcf77f (AT) newsgroups (DOT) borland.com...
i want via code also ak Bottom, how?
Anchors is a Set. Like any other Set, use the '<<' operator to include new
values, ie:
Panel->Anchors = Panel->Anchors << akBottom;
|
It is also a Property, so you *can't* do the following:
Panel->Anchors <<= akBottom;
although it looks like you should be able to. If you do, you'll just
be setting the flag in a temp variable and the change won't "stick".
--
Jonathan Arnold C/C++/CBuilder Keen Advice:
http://www.keen.com/categories/categorylist_expand.asp?sid=5156620
Comprehensive C++Builder link site:
http://www.buddydog.org/C++Builder/c++builder.html
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Thu Nov 20, 2003 7:35 pm Post subject: Re: Anchors [akLeft,akTop,akRight,akBottom] |
|
|
"Jonathan Arnold" <jdarnold (AT) buddydog (DOT) org> wrote
| Quote: | It is also a Property, so you *can't* do the following:
Panel->Anchors <<= akBottom;
|
Which is why I did not write my example like that to begin with :-p
Gambit
|
|
| Back to top |
|
 |
Jonathan Arnold Guest
|
Posted: Thu Nov 20, 2003 7:49 pm Post subject: Re: Anchors [akLeft,akTop,akRight,akBottom] |
|
|
Remy Lebeau (TeamB) wrote:
| Quote: | "Jonathan Arnold" <jdarnold (AT) buddydog (DOT) org> wrote in message
news:3fbd1176$1 (AT) newsgroups (DOT) borland.com...
It is also a Property, so you *can't* do the following:
Panel->Anchors <<= akBottom;
Which is why I did not write my example like that to begin with :-p
|
But I wouldn't be surprised if that is what the original poster
did, or tried, and saw that it didn't work. Or it would have been
the next question:-)
--
Jonathan Arnold C/C++/CBuilder Keen Advice:
http://www.keen.com/categories/categorylist_expand.asp?sid=5156620
Comprehensive C++Builder link site:
http://www.buddydog.org/C++Builder/c++builder.html
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Thu Nov 20, 2003 8:31 pm Post subject: Re: Anchors [akLeft,akTop,akRight,akBottom] |
|
|
"Jonathan Arnold" <jdarnold (AT) buddydog (DOT) org> wrote
| Quote: | But I wouldn't be surprised if that is what the original
poster did, or tried, and saw that it didn't work.
|
Actually, in reality, most beginners to Set properties don't use '=' at all,
they write it as this instead:
Panel->Anchors << akBottom;
Which is still wrong, for the same reason you mentioned - it modifies a
temporary copy of the Set and does not assign the temporary back to the
property.
Gambit
|
|
| Back to top |
|
 |
gif Guest
|
Posted: Fri Nov 21, 2003 9:51 pm Post subject: Re: Anchors [akLeft,akTop,akRight,akBottom] |
|
|
to empty all the setting inside the Anchors how can i do?
And if it is full but i want exclude right akLeft?
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Fri Nov 21, 2003 10:11 pm Post subject: Re: Anchors [akLeft,akTop,akRight,akBottom] |
|
|
"gif" <jeyweb (AT) yahoo (DOT) it> wrote
| Quote: | to empty all the setting inside the Anchors how can i do?
|
Panel->Anchors = TAnchors();
Or
Panel->Anchors = Panel->Anchors >> akTop >> akLeft >> akRight >>
akBottom ;
| Quote: | And if it is full but i want exclude right akLeft?
|
Panel->Anchors = Panel->Anchors >> akLeft;
Gambit
|
|
| Back to top |
|
 |
Jonathan Arnold Guest
|
|
| 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
|
|