Title Bar Update Topic is solved

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
rafae11
Experienced Solver
Experienced Solver
Posts: 85
Joined: Sat Jun 02, 2012 8:41 am

Title Bar Update

Post by rafae11 »

I have a custom title bar similar to the picture below.
my application has around 50 fields. i would want the title to have an * when any of the fields are modified.

Is there an easy way of attaching a general if statement rather than adding it to each individual field.
many thanks.
Attachments
a.png
a.png (30.26 KiB) Viewed 1090 times
Jophin
Knows some wx things
Knows some wx things
Posts: 41
Joined: Sun Apr 05, 2009 1:53 am
Location: Maharashtra , India

Re: Title Bar Update

Post by Jophin »

If you are using wxAuiNotebook Class , then check out this untested code ,


int PageIndex = Notebook->GetSelection; // Get current selected page
wxString Title = Notebook->GetPageText (PageIndex); //Get page title
Title += " *" ; // Append * with page title
Notebook->SetPageText (PageIndex, Title); // Change the title
Jophin K.
Maharashtra , India
Post Reply