Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
awksed is currently offline  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());
}
 
Read Message
Read Message
Previous Topic: [SOLVED] Lib Curl undefined reference
Next Topic: [SOLVED] Invalid memory access on ImageDraw::Init (X11)
Goto Forum:
  


Current Time: Sun May 05 02:45:12 CEST 2024

Total time taken to generate the page: 0.02879 seconds