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 

Wordwrapping the caption of a TRadioButton

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





PostPosted: Mon Dec 22, 2003 2:50 pm    Post subject: Wordwrapping the caption of a TRadioButton Reply with quote



Hi,

How can I force a radio button in a TRadioGroup to word wrap its caption? O:-)

Thanks, and Merry Christmas!
Back to top
Damon Chandler (TeamB)
Guest





PostPosted: Tue Dec 23, 2003 5:55 am    Post subject: Re: Wordwrapping the caption of a TRadioButton Reply with quote



Hi,
Quote:
How can I force a radio button in a TRadioGroup to
word wrap its caption? OSmile

You can do this by adding the BS_MULTILINE style to the radio button(s)...

int const count = RadioGroup1->ControlCount;
for (int index = 0; index < count; ++index)
{
TWinControl* RadioButton =
static_cast RadioGroup1->Controls[index]
);
HWND const hButton = RadioButton->Handle;
SetWindowLong(
hButton, GWL_STYLE,
GetWindowLong(hButton, GWL_STYLE) |
BS_MULTILINE
);
}
RadioGroup1->Refresh();

HTH,
Damon (TeamB)

Back to top
Fernando
Guest





PostPosted: Sun Dec 28, 2003 3:02 pm    Post subject: Re: Wordwrapping the caption of a TRadioButton Reply with quote



On Tue, 23 Dec 2003 00:55:00 -0500, "Damon Chandler (TeamB)"
<dmc27 (AT) cornell (DOT) edu> wrote:

Quote:
Hi,
How can I force a radio button in a TRadioGroup to
word wrap its caption? O:-)

You can do this by adding the BS_MULTILINE style to the radio button(s)...

[snip]

Damon,

It seems to work when the TRadioGroup is on the TForm, but I have it on a
TTabStrip. In this situation, it doesn't work, although the SetWindowLong
doesn't report any error by returning 0.

Do you have any idea of what might be going on? O:-)

TIA

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.