how to set Dialog Caption

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
rajaramtsql
Earned a small fee
Earned a small fee
Posts: 20
Joined: Wed Feb 20, 2013 5:41 am

how to set Dialog Caption

Post by rajaramtsql »

how to set Dialog Caption in different position,give idea
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: how to set Dialog Caption

Post by doublemax »

I don't know what you mean.
Use the source, Luke!
modoran
Knows some wx things
Knows some wx things
Posts: 47
Joined: Tue Mar 23, 2010 1:31 pm
Location: Romania
Contact:

Re: how to set Dialog Caption

Post by modoran »

I think he means "dialog title". However, there is no way to align the text into different positions, unless you calculate window size, character width anf fill with empty spaces.
rajaramtsql
Earned a small fee
Earned a small fee
Posts: 20
Joined: Wed Feb 20, 2013 5:41 am

Re: how to set Dialog Caption

Post by rajaramtsql »

doublemax wrote:I don't know what you mean.
Sorry,
how to set Dialog title center or right position?
rajaramtsql
Earned a small fee
Earned a small fee
Posts: 20
Joined: Wed Feb 20, 2013 5:41 am

Re: how to set Dialog Caption

Post by rajaramtsql »

modoran wrote:I think he means "dialog title". However, there is no way to align the text into different positions, unless you calculate window size, character width anf fill with empty spaces.
Thanks,any other way to set the dialog caption
Radek
Super wx Problem Solver
Super wx Problem Solver
Posts: 286
Joined: Sun Sep 11, 2011 7:17 am

Re: how to set Dialog Caption

Post by Radek »

Positioning the title text on the titlebar is controlled by the operating system settings and it cannot be changed on per application basis. The application can only specify the text for the titlebar but it cannot specify whether the text will be centered or edge adjusted or what font will be used for displaying the text. I don't think your chances are good here.
User avatar
nelson777
Earned some good credits
Earned some good credits
Posts: 117
Joined: Mon Sep 19, 2005 3:50 pm
Location: Fortaleza - Brasil

Re: how to set Dialog Caption

Post by nelson777 »

Well, it's controlled by the system, but if I were to try this, maybe I could calculate the aproximate number of characters the title would be able to show, based on the font width and window width and then add enough number of spaces to the title in order to right align it or center it. But I don't know if it would work for all cases because it would depend on system font. But maybe you can give it a try. :)
Post Reply