Jump to content

force scrollbars


jahlxx

Recommended Posts

The only solution I see is put a scrollbox inside the form, align = alclient, and every element, put them into the scrollbox.

 

I don't know if this is the bes solution. Some test, are working, but I don't know if this is a stupid idea.

 

WHat do you think?

Link to comment
Share on other sites

every thing works except panels.

what do you mean?

 

TUniForm

         height 100

         width   100

         TUniScrollBox

              align: alClient

                 TUniPanel

                      align: alNone

                      height 200

                      width 50

 

 

You should see scrollbars. Of course if the panel has "align: alClient" you won't see any scrollbars, as the panel height and width will change accordingly.

             

Link to comment
Share on other sites

Hi.

 

I've the panel align altop, and can't do scroll if I don't put another scrollbox inside it, like this:

 

TUniForm

         TUniScrollBox

              align: alClient
                 TUniPanel

                      align: altop

                      TUniScrollBox

                             align: alClient

Link to comment
Share on other sites

If you want to do scroll inside the panel yes, you have to do as you say. It may be sufficient to put a scrollbox inside a scrollbox (without the panel). Beware it may result in a confusing interface.

 

------------^^

 scrollbox2 ||

   (alTop)  ||   2 scrollbars

            ||

------------v|

 scrollbox1  |  

 (container) |

-------------v

 

Let me explain one thing (sorry if it is obvious)

By default, the scrollbars appear if any object directly inside (1 level!) the scrollbox exceeds the boundaries of the scrollbox. So if you have a 10x10 panel inside a 20x20 scrollbox, any object you put in the panel will not make the bars appear.

 

 

TUniForm

         TUniScrollBox

              align: alClient

              height: 20

              width: 20
                 TUniPanel  <====panel does not exceed boundaries, no scrollbars

                      align: alNone

                      top: 0

                      left: 0

                      height: 10

                      width: 10

                      TUniLabel <====it doesn't matter if the object is in [150,150], the scrollbox doesn't "see" it

                            top: 150

                            left: 150

 

If you remove the panel.....

TUniForm

         TUniScrollBox

              align: alClient

              height: 20

              width: 20                 

                      TUniLabel <==== now you have bars

                            top: 150

                            left: 150

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...