Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8550

Add scrolling to RhinoUIDockbar

$
0
0

@Termi wrote:

I'm trying to add scrolling capabilities to a CRhinoUIDockbar. I'd use the CRhinoTabbedDockBarDialog with scrolling provided in the Rhino5Samples for C++, but the Dockbar has to be docked at the bottom of the screen and to my understanding this is not possible with the CRhinoTabbedDockbarDialog.

As far as I was able to find, scrolling is already possible with normal user controls (e.g. buttons), but I'm drawing content on the dockbar so the built in scrolling functionality doesn't work.

My idea was to add a "panel" (created as a resource and implemented as a borderless CDialog) to the CRhinoUIDockbar, use it as a canvas to draw on and let the dockbar handle the scrolling, but I'm not able to display it at all.

Panel constructor:

PanelCanvas::PanelCanvas(CWnd* pParent) : CDialog(PanelCanvas::IDD, pParent) {
	Create(IDD_PANELCANVAS, pParent);
}

Dockbar constructor:

panelCanvas = new PanelCanvas(this);
m_scrollHelper = new ScrollHelper();
m_scrollHelper->AttachWnd(this);
CRect drawing_area;
GetClientRect(&drawing_area);
m_scrollHelper->SetDisplaySize(drawing_area.Width(), drawing_area.Height());
panelCanvas->ShowWindow(SW_SHOW);

I'd be grateful for any ideas or suggestions as to what I'm doing wrong or point me in another direction alltogether.

Thanks in advance!

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 8550

Trending Articles