Scroll content of Dialog/Notebook on low resolution displays
Scroll content of Dialog/Notebook on low resolution displays
Hi,
if a dialog is bigger than the display can show, RaspBerry Pi with a small display, it would be nice if you could scroll the contents to be able to use it.
Is there a common solution for this?
Experiments with embedding the dialog contents with in a scrolled window did not work for me.
Note: All dialogs have a vertical box sizer and a wxNotebook.
if a dialog is bigger than the display can show, RaspBerry Pi with a small display, it would be nice if you could scroll the contents to be able to use it.
Is there a common solution for this?
Experiments with embedding the dialog contents with in a scrolled window did not work for me.
Note: All dialogs have a vertical box sizer and a wxNotebook.
Re: Scroll content of Dialog/Notebook on low resolution displays
That should work.Experiments with embedding the dialog contents with in a scrolled window did not work for me.
A step that is often forgotten is to call SetScrollbars(...), otherwise the scrollbars won't appear.
http://docs.wxwidgets.org/trunk/classwx ... 4a8e1210bb
Use the source, Luke!
Re: Scroll content of Dialog/Notebook on low resolution displays
Hi,
I create some of the Dialogs with the Tool DialogBlocks, and this call is automatically embedded.
If I use a wxScrolledWindow the content is minimised.
See the attached screen shots.
The first one ist without a scrolled windows and the second one with a scrolled window.
I create some of the Dialogs with the Tool DialogBlocks, and this call is automatically embedded.
If I use a wxScrolledWindow the content is minimised.
See the attached screen shots.
The first one ist without a scrolled windows and the second one with a scrolled window.
Re: Scroll content of Dialog/Notebook on low resolution displays
The wxScrolledWindow should come directly after the dialog in the hierarchy.
dialog -> scrolledwindow -> vsizer
Everything else remains the same.
dialog -> scrolledwindow -> vsizer
Everything else remains the same.
Use the source, Luke!
Re: Scroll content of Dialog/Notebook on low resolution displays
also in this order the dialog is very small.
Re: Scroll content of Dialog/Notebook on low resolution displays
How does it look at runtime?
Use the source, Luke!
Re: Scroll content of Dialog/Notebook on low resolution displays
It looks like this:
The scrolling works.
Re: Scroll content of Dialog/Notebook on low resolution displays
Something like vsizer->Fit( dialog ) should do the trick.
Use the source, Luke!
Re: Scroll content of Dialog/Notebook on low resolution displays
Yes, almost there.
but if there is enough room it still does not show all it content.
but if there is enough room it still does not show all it content.
Code: Select all
RocguiIniDialog::RocguiIniDialog( wxWindow* parent, iONode ini )
{
Create(parent, -1, _("Rocview"));
initLabels();
m_Ini = ini;
m_GeneralTab->GetSizer()->Layout();
m_TracePanel->GetSizer()->Layout();
m_MICpanel->GetSizer()->Layout();
m_PTpanel->GetSizer()->Layout();
m_SVGpanel->GetSizer()->Layout();
m_RICpanel->GetSizer()->Layout();
m_Notebook->Fit();
m_Scroller->GetSizer()->Fit(this);
m_Scroller->GetSizer()->SetSizeHints(this);
initValues();
}
Re: Scroll content of Dialog/Notebook on low resolution displays
If I disable to show the scrollbars always, it works as expected also with low resolution where the scrollbars appear.
The draw back is I cannot edit the dialog any longer with DialogBlocks... (Version 5.11.1)
The draw back is I cannot edit the dialog any longer with DialogBlocks... (Version 5.11.1)