Home » Community » Newbie corner » How do I add scrollbars to a dialog
Re: How do I add scrollbars to a dialog [message #51997 is a reply to message #51985] |
Mon, 01 July 2019 12:37 |
awksed
Messages: 61 Registered: April 2012
|
Member |
|
|
Got a little further with this. V scrollbar appears ok but client ArrayCtrl and StaticText controls are not redrawn.
How do I get the visible area to redraw on scrolling?
MyDlg::MyDlg()
{
AddFrame(m_Sb); // (ScrollBars m_Sb;)
m_Sb.HideX();
m_Sb.WhenScroll = [=] { Ctrl::Refresh(); };
}
void MyDlg::Init()
{
.
.
.
Size S = {0, nWindowHeight};
m_Sb.SetTotal(S);
m_Sb.SetPageY(nWindowHeight); // No scrollbar initially
m_Sb.SetLine(0);
}
void MyDlg::Layout()
{
m_Sb.SetPageY(GetRect().GetSize());
}
|
|
|
Goto Forum:
Current Time: Sun May 05 02:45:12 CEST 2024
Total time taken to generate the page: 0.02879 seconds
|