I am trying to use the SetPropertyHelpString function, however, I am unsure of where the text will be disabled.
While looking at the documentation it says
"By default, text is shown either in the manager's "description" text box or in the status bar. If extra window style wxPG_EX_HELP_AS_TOOLTIPS is used, then the text will appear as a tooltip. "
However, how can I set up the "manager's "description" text box"?
wxPropertyGrid and SetPropertyHelpString
-
- Ultimate wxWidgets Guru
- Posts: 672
- Joined: Tue Aug 31, 2010 6:22 am
- Location: Belgium
-
- Ultimate wxWidgets Guru
- Posts: 672
- Joined: Tue Aug 31, 2010 6:22 am
- Location: Belgium
If you do not want to use wxProprtyGridManager, my comprehension of the doc is that, either you create a status bar and help will be inserted within it, or you create your wxProprtyGrid with style wxPG_EX_HELP_AS_TOOLTIPS and help will be displayed in a tooltip. But, you cannot use the manager's "description" text box, as you are not using the wxProprtyGridManager
There is no way to do it directly in wxPropertyGrid. But you can do it by hand, handling the wxEVT_PG_CHANGED event, to show the help string in your custom control :
Or you can customize the wxPropertyGridManager to fit your needs (see the available styles).
Code: Select all
Window::Window(...)
{
...
// Create your custom help control
m_myCustomHelpControl = new ...(this, ...);
propGrid->Connect(wxEVT_PG_CHANGING, wxPropertyGridEventHandler(Window::OnPropertyChanged), NULL, this);
}
void Window::OnPropertyChanged( wxPropertyGridEvent& event )
{
wxPGProperty* prop = event.GetProperty();
m_myCustomHelpControl->SetValue( prop->GetHelpString() );
}
Jérémie
I basically want to strip it down to look exactly like a wxProperyGrid, but since I have to add a page, there is always the page toggle button. I don't see a way to get ride of that button, is there a way to?jfouche wrote: Or you can customize the wxPropertyGridManager to fit your needs (see the available styles).
Remove the toolbar...
If you have only one page, you won't have any problems. I personnaly use :
If you have only one page, you won't have any problems. I personnaly use :
Code: Select all
m_pgmParams = new wxPropertyGridManager(m_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPGMAN_DEFAULT_STYLE|wxPG_BOLD_MODIFIED|wxPG_DESCRIPTION|wxPG_TOOLTIPS|wxTAB_TRAVERSAL);
Jérémie