Jump to content

UniScrollBox if vertical scrollbar not at top position at compile time


Recommended Posts

Posted

Hi,

Using 

UniSession.AddJS(uniScrollbox.JSName+'.getTargetEl().scrollTo(''Top'', 0, true);');

gets the vertical scrollbar to the top position at runtime but if the vertical scrollbar was left anywhere but at the top position at compile time, there is no way to reach the top part of the scrollbox anymore.

 

image.png.e53116447431482b0adeb401390d1c87.png

If you drag the 2 scrollbars to their bottom position and click 'ScrollTo TOP' button, the left scrollbox is going back to the top position but the MID scrollbox returns to button4 and the first 3 buttons are unreachable. The position of the vertical scrollbar at compile time becomes the new top of the scrollbox at runtime.

I made a small test application: ScrollBoxTest.7z

Delphi 10.1 UniGui 1.90.0.1496

ScrollBoxTest.7z

Posted
58 minutes ago, dpfmp said:

gets the vertical scrollbar to the top position at runtime but if the vertical scrollbar was left anywhere but at the top position at compile time, there is no way to reach the top part of the scrollbox anymore.

Hi,

Yes, there is a bug: TUniScrollbox actually changes the top and left properties of the controls it contains, when you scroll.

We will fix this issue.

Posted

Hi Farshad,

Is there a way to force the scrollbar to the top position in the OnBeforeShow event?  

The VCL version  has a VerticalScrollBar.Position that can be used to bring it back to the top.

As it is,  any uniscrollbox with a vertical scrollbar left in a position other than the top position at design time will make part of it unusable at runtime.

Thank you for looking into it.

Denis Prince

 

Posted
5 minutes ago, dpfmp said:

Is there a way to force the scrollbar to the top position in the OnBeforeShow event?  

Hi,

At the moment, the best way is to set "top = 0" in designtime.

Posted

Hi Sherzod,

'Top' has to do with the UniScrollBox and not the vertical scrollbar. I guess what you mean is that for every uniscrollbox having a verticalscrollbar at design time, I should always drag the scrollbar at the top position before compiling.

That is what I'll keep doing.

Thank you

 

 

 

Posted
4 minutes ago, dpfmp said:

I guess what you mean is that for every uniscrollbox having a verticalscrollbar at design time, I should always drag the scrollbar at the top position before compiling.

At the moment, yes. 

  • 8 months later...
Posted

I still have this behavior, sometimes in design I end up forgetting the scroll in any position, and when running, it shows me an empty area at the top of the scroll, this seems to me the same problem as the friend mentioned above, which seems to have been fixed . I will attach prints for better understanding.

 

image.thumb.png.3801988d0d782ba53f61c3518941c349.png

 

IF YOU EXECUTE THIS WAY IT WILL BE LIKE:

 

image.thumb.png.736a610c47c0acc5a88885561fdab085.png

 

STAY WITH THIS EMPTY AREA

 

COMPILED WITH SCROOL OUT OF INITIAL POSITION

 

image.thumb.png.50d80cdea5a825f3e60e8ca7c38dd36d.png

 

 

 

 

 

 

 

 

image.png

  • 8 months later...
Posted
Just now, Gustavo_GRSoft said:

I can't because the project is very complex and has several database connections. Is there any way to make the scrollbox go to the top dynamically?

I am not asking for a test case from you.

 

18 minutes ago, Sherzod said:

Can you reproduce this issue with this demo?:


\FMSoft\Framework\uniGUI\Demos\Desktop\ScrollBox

This is a standard UniGUI demo. I mean, could you reproduce your case in this demo example?

Posted
17 minutes ago, Gustavo_GRSoft said:

I can't because the error only happens when I feed a dbgrid and only happens in this situation, the rest of the system works perfectly

TeamViewer?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...