BBC BASIC for Windows
« Property sheet controls »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:58pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Property sheet controls  (Read 649 times)
Matt
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 210
xx 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
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx 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.
User IP Logged

Matt
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 210
xx 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
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx 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.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls