BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Anchors [akLeft,akTop,akRight,akBottom]

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
gif
Guest





PostPosted: Thu Nov 20, 2003 5:18 pm    Post subject: Anchors [akLeft,akTop,akRight,akBottom] Reply with quote



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





PostPosted: Thu Nov 20, 2003 6:18 pm    Post subject: Re: Anchors [akLeft,akTop,akRight,akBottom] Reply with quote




"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





PostPosted: Thu Nov 20, 2003 7:09 pm    Post subject: Re: Anchors [akLeft,akTop,akRight,akBottom] Reply with quote



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





PostPosted: Thu Nov 20, 2003 7:35 pm    Post subject: Re: Anchors [akLeft,akTop,akRight,akBottom] Reply with quote


"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





PostPosted: Thu Nov 20, 2003 7:49 pm    Post subject: Re: Anchors [akLeft,akTop,akRight,akBottom] Reply with quote

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





PostPosted: Thu Nov 20, 2003 8:31 pm    Post subject: Re: Anchors [akLeft,akTop,akRight,akBottom] Reply with quote

"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





PostPosted: Fri Nov 21, 2003 9:51 pm    Post subject: Re: Anchors [akLeft,akTop,akRight,akBottom] Reply with quote

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





PostPosted: Fri Nov 21, 2003 10:11 pm    Post subject: Re: Anchors [akLeft,akTop,akRight,akBottom] Reply with quote


"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





PostPosted: Sat Nov 22, 2003 1:05 am    Post subject: Re: Anchors [akLeft,akTop,akRight,akBottom] Reply with quote

gif wrote:
Quote:
to empty all the setting inside the Anchors how can i do?
And if it is full but i want exclude right akLeft?

If you just want to set it to something:

Panel->Anchors = TAnchors() << akTop << akRight;

Sets the anchors to be top & right.

--
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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.