 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Fernando Guest
|
Posted: Mon Dec 22, 2003 2:50 pm Post subject: Wordwrapping the caption of a TRadioButton |
|
|
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
|
Posted: Tue Dec 23, 2003 5:55 am Post subject: Re: Wordwrapping the caption of a TRadioButton |
|
|
Hi,
| Quote: | 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)...
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
|
Posted: Sun Dec 28, 2003 3:02 pm Post subject: Re: Wordwrapping the caption of a TRadioButton |
|
|
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 |
|
 |
|
|
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
|
|