CButton text alignment problem
-
I have a button control on a dialog. The caption is quite long, so I set the multiline property to true. The caption is centered in the button at design time, but at run time, if the display is set to Windows Classic theme, the caption appears left aligned, regardless of what value I put for the Horizontal Alignment property. What could be the problem?
-
I have a button control on a dialog. The caption is quite long, so I set the multiline property to true. The caption is centered in the button at design time, but at run time, if the display is set to Windows Classic theme, the caption appears left aligned, regardless of what value I put for the Horizontal Alignment property. What could be the problem?
-
Shree wrote:
What could be the problem?
no problem, it's how the CButton class is designed. how do you want it to behave like ?
Since the text appears centered during design time, I would naturally expect it to appear centered during run time. Why does it become left aligned, and only when the text does not fit in one line, and only in the Windows classic theme? Or if the text should appear left aligned by design, how can I get it to appear centered?