Scrollbar on Panel

Find and share HowTos to various installations / configurations!
Search

Post Reply
4 posts • Page 1 of 1
Arbudu
Posts: 13
Joined: Thu Sep 25, 2014 10:46 am

Scrollbar on Panel

Post by Arbudu »

Hello!
Tell me please how to make scrollbar on panel. I am using TabWidget and several panels for tabs. One panel is biggest than other panels and i can not access to bottom part of panel because TabWidget is not create scrollbar.
How to make scrollbar?
Thank you.

User avatar
fmulder
Posts: 330
Joined: Wed Feb 03, 2010 9:46 am

Re: Scrollbar on Panel

Post by fmulder »

Yes, you are right. The tab widget will not automatically scale the panel or add a scrollbar. Normally I make panels that exactly fit the tab. I believe that it is not very common to make a tab with a scrollbar. I do not know any standard panel (look in Office) where there's a scrollbar. Normally, when your panel doesn't fit in the tab, you separate the panel and make two tabs.

But ok. I understand the issue.

The only solution right now would be (when your tab control is 200*200 pixels and your panel is 500*500)
- Make a panel called PANEL200_200 that is 200* 200 pixels
- In this panel you drag an embedded module 200*200.
- You give this 'embedded module' a modulename.
module.ModuleName = "MYPANEL";
- Use ModuleOnWithpanel() to load your bigger panel (500*500) into this embedded module
- Add the panel PANEL200_200 to the tab

Still, I would consider to split your screen and use two tabs. A tab wiith a scrollbar will look a bit strange

Good luck

Frenk

thalter
Posts: 16
Joined: Thu Nov 04, 2010 7:19 am

Re: Scrollbar on Panel

Post by thalter »

you could also change the size of the panel, when you click on tabs.


...
getValue("tab1","activeRegister", tabNum);
tabNum++;
x=g_sizeWin_x[tabNum];
y=g_sizeWin_y[tabNum];

setPanelSize(myModuleName(),myPanelName(), FALSE, x, y);
setValue("tab1", "size", x, y);
...

User avatar
fmulder
Posts: 330
Joined: Wed Feb 03, 2010 9:46 am

Re: Scrollbar on Panel

Post by fmulder »

Please note that changing a panel when clicking on a tab is not standard Windows behaviour and I would strongly advise against it.
Your end-user will most like not expect, understand or appreciate such a graphical behavior.

I would still recommend that you split the panel

Post Reply
4 posts • Page 1 of 1