Author |
Topic: Property sheet controls (Read 650 times) |
|
Matt
Developer
member is offline


Gender: 
Posts: 210
|
 |
Property sheet controls
« Thread started on: Oct 19th, 2010, 08:42am » |
|
Another question about property sheets:
With dialog boxes you can change the box title by using the command: SYS "SetWindowText", !dlg%, newtitle$
To change the main title of a propsht I've found that SYS "SetWindowText", !psh%, newtitle$ works.
However, I have tried various methods to change an individual propety sheet page title, but without success. I can't find anything in the help, am I (yet again) missing something?
Matt
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Property sheet controls
« Reply #1 on: Oct 19th, 2010, 10:32am » |
|
on Oct 19th, 2010, 08:42am, Matt wrote:However, I have tried various methods to change an individual propety sheet page title, but without success. |
|
It's not a common requirement. Usually, the titles of the individual pages remain unchanged from their initial values, for as long as the property sheet is displayed. Are you sure it really makes sense to change the title(s) 'dynamically' - does it not risk confusing the user?
If you're convinced it is sensible, the only way I know to do it is to modify the property sheet template in memory. You need to set the PSP_USETITLE flag for the relevant page, and set the pszTitle member of the PROPSHEETPAGE structure to point to a NUL-terminated string containing the new title:
http://msdn.microsoft.com/en-us/library/aa815151.aspx
Richard.
|
|
Logged
|
|
|
|
Matt
Developer
member is offline


Gender: 
Posts: 210
|
 |
Re: Property sheet controls
« Reply #2 on: Oct 19th, 2010, 7:59pm » |
|
Thanks for the reply.
I had considered the reason necessary, but reconsidered and I'm now going to use a dialog box instead. The reason was that the tabs were the categories for a competition, and the names of these would be changeable from one cometition to the next. However, I agree that the need would not normally arise, and I've decided to have a single dialog box with a label and buttons to pan through the categories. Part of the reason for this change is the compexity of doing it the other way.
Thanks again. Much appreciated.
Matt
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Property sheet controls
« Reply #3 on: Oct 19th, 2010, 10:32pm » |
|
on Oct 19th, 2010, 7:59pm, Matt wrote:I've decided to have a single dialog box with a label and buttons to pan through the categories. |
|
There is a half-way house, which is to use a Tab Control:
http://bb4w.wikispaces.com/Creating+a+tab+control
That gives you a lot more flexibility than a property sheet, including the ability to change the 'tab' titles on the fly without messing about with templates, but because it operates at a lower level it is somewhat more work.
Richard.
|
|
Logged
|
|
|
|
|