PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Creating a scrollable tab in a window  (Read 1845 times)

Andrew Lindsay

  • Junior Member
  • **
  • Posts: 76
Creating a scrollable tab in a window
« on: January 31, 2016, 07:38:12 PM »

Hello,


I'd love to know if it's possible to create a scrollable tab child.


Basically, I'd like to be able to scroll a form up and down within a tab control's child form because I have too many items to fit on the tab area, but don't want to break it across multiple tabs.


Any assistance would be appreciated.


Regards


Andrew
Logged

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8865
  • Windows 10
    • PlanetSquires Software
Re: Creating a scrollable tab in a window
« Reply #1 on: January 31, 2016, 09:43:33 PM »

Yes, this can be done. I use this technique in the FireFly designer itself. The visual design space allows for scrollbars in order to accommodate forms larger than the physical screen size. I will need to dig out that code to see if I can make a good example for you. I seem to remember this question being asked before.... maybe I already answered a similar question from someone else? Not sure. :)
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Paul Squires

  • Administrator
  • Guru Member
  • *****
  • Posts: 8865
  • Windows 10
    • PlanetSquires Software
Re: Creating a scrollable tab in a window
« Reply #2 on: February 01, 2016, 12:55:56 PM »

I have attached an example of how to scroll a form using scrollbars. It is based on some VERY old code that I used years ago in FB. I am using a global TYPE to hold the viewport information but a better approach would be to tie the info to each form using SetProperty or similar.

I am sure that there must be better and more efficient ways of doing this, but the code attached does work well.

Remember to set the WindowStyles of the main form (frmMain) to have HSCROLL and VSCROLL scrollbars set. I used a non-modal child form to house all of the controls that need to be moved whenever the scrollbars are manipulated. That is much easier than moving each individual control.
Logged
Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

Andrew Lindsay

  • Junior Member
  • **
  • Posts: 76
Re: Creating a scrollable tab in a window
« Reply #3 on: February 01, 2016, 01:14:33 PM »

Thanks Paul,


This will give me something to study over the next day or so.  I'll probably be back again asking silly questions about it soon enough though, or who knows, I may even be able to implement your idea of using the SetProperty.


Regards
Andrew
Logged