Home All Groups Group Topic Archive Search About

Is it possible to center the text of a groupbox?

Author
28 Apr 2006 1:10 PM
Marcel Brekelmans
Hi,

Is this possible? Normally, you get a groupbox with the text at the left
side. I would like to have it centered. Is this possible?

Thanks

Author
28 Apr 2006 4:25 PM
Tim Wilson
AFAIK, there is no way to tell the GroupBox to center its header text. What
you could do is clear the GroupBox text and then use a Label placed over the
frame for the header text.

--
Tim Wilson
..NET Compact Framework MVP

Show quoteHide quote
"Marcel Brekelmans" <mar***@marcel-art.com> wrote in message
news:5tqdnfuFC4XEic_ZnZ2dnUVZ8t2dnZ2d@giganews.com...
> Hi,
>
> Is this possible? Normally, you get a groupbox with the text at the left
> side. I would like to have it centered. Is this possible?
>
> Thanks
>
>
Are all your drivers up to date? click for free checkup

Author
28 Apr 2006 7:07 PM
Mythran
Show quote Hide quote
"Tim Wilson" <TIM(UNDERSCORE)WILSON(AT)ROGERS(PERIOD)COM> wrote in message
news:e65cxAuaGHA.3444@TK2MSFTNGP05.phx.gbl...
> AFAIK, there is no way to tell the GroupBox to center its header text.
> What
> you could do is clear the GroupBox text and then use a Label placed over
> the
> frame for the header text.
>
> --
> Tim Wilson
> .NET Compact Framework MVP
>
> "Marcel Brekelmans" <mar***@marcel-art.com> wrote in message
> news:5tqdnfuFC4XEic_ZnZ2dnUVZ8t2dnZ2d@giganews.com...
>> Hi,
>>
>> Is this possible? Normally, you get a groupbox with the text at the left
>> side. I would like to have it centered. Is this possible?
>>
>> Thanks
>>
>>
>
>

One way is to create a control, override it's OnPaint method, and draw it
yourself.  That's how I did it :)

Mythran
Author
28 Apr 2006 8:14 PM
Marcel Brekelmans
Yes, I had forgotten about that one :) But it works, thanks!

Show quoteHide quote
"Mythran" <kip_potter@hotmail.comREMOVETRAIL> schreef in bericht
news:unRTubvaGHA.5116@TK2MSFTNGP05.phx.gbl...
>
> "Tim Wilson" <TIM(UNDERSCORE)WILSON(AT)ROGERS(PERIOD)COM> wrote in message
> news:e65cxAuaGHA.3444@TK2MSFTNGP05.phx.gbl...
>> AFAIK, there is no way to tell the GroupBox to center its header text.
>> What
>> you could do is clear the GroupBox text and then use a Label placed over
>> the
>> frame for the header text.
>>
>> --
>> Tim Wilson
>> .NET Compact Framework MVP
>>
>> "Marcel Brekelmans" <mar***@marcel-art.com> wrote in message
>> news:5tqdnfuFC4XEic_ZnZ2dnUVZ8t2dnZ2d@giganews.com...
>>> Hi,
>>>
>>> Is this possible? Normally, you get a groupbox with the text at the left
>>> side. I would like to have it centered. Is this possible?
>>>
>>> Thanks
>>>
>>>
>>
>>
>
> One way is to create a control, override it's OnPaint method, and draw it
> yourself.  That's how I did it :)
>
> Mythran
>

Bookmark and Share