bbosnjak Posted February 28, 2017 Share Posted February 28, 2017 I have a TUnimPanel inside a TUnimScrollBox. I don't know what height the panel needs to be at design time, so at runtime I need to set the panel height accordingly. The result at runtime is that the panel's height changes correctly, but the scroll box maintains its original scroll range. As a result, I can't scroll down to the bottom of the panel. What's the February 2017 solution to this old problem (the old solutions aren't working for me :-( )? Link to comment Share on other sites More sharing options...
Sherzod Posted February 28, 2017 Share Posted February 28, 2017 Hi, Can you try this approach for now? For example: procedure TMainmForm.UnimButton1Click(Sender: TObject); var dHeight: Integer; scrollJSName: string; begin dHeight := 400; UnimPanel1.Height := UnimPanel1.Height + dHeight; scrollJSName := UnimScrollBox1.JSName; UniSession.AddJS('var me='+scrollJSName+'.scrollableBehavior.scrollView.getScroller(); me.maxPosition.y+='+IntToStr(dHeight)); end; Best regards. Link to comment Share on other sites More sharing options...
bbosnjak Posted February 28, 2017 Author Share Posted February 28, 2017 Thanks - that basically works (I need to tweak some things of course). How do I invoke this automatically now, instead of requiring the user to click a button? Note that I'm populating the panel/scrollbox in the OnBeforeShow method. Link to comment Share on other sites More sharing options...
Recommended Posts