WillemvanZyl Posted October 10, 2017 Share Posted October 10, 2017 Hi, I have a TUnimScrollbox that contains many edit controls. I want to scroll to a specific control but get an access violation when I try the following call: MyScrollBox.ScrollInView(TheEditToView); Any help? Link to comment Share on other sites More sharing options...
Sherzod Posted October 10, 2017 Share Posted October 10, 2017 Hi, We will check this. Best regards, Link to comment Share on other sites More sharing options...
Sherzod Posted October 10, 2017 Share Posted October 10, 2017 Hi, Can you use WebFocus method for this ?!: UnimEditxxx.WebFocus; Best regards, Link to comment Share on other sites More sharing options...
WillemvanZyl Posted October 10, 2017 Author Share Posted October 10, 2017 Hi, Unfortunately this method did not work Link to comment Share on other sites More sharing options...
Mqtt Posted March 5, 2018 Share Posted March 5, 2018 Hi,is there already a solution found? I would need this. Thank you! Link to comment Share on other sites More sharing options...
Sherzod Posted March 5, 2018 Share Posted March 5, 2018 Hi, Hi,is there already a solution found? I would need this. Thank you! Which build are you using ?! And can you make a simple testcase for your issue ? Link to comment Share on other sites More sharing options...
Mqtt Posted March 5, 2018 Share Posted March 5, 2018 Hi, i use the newest version, i'm totally new to unigui (and javascript..) Version 1.0.0.1425 I added a UnimScrollbox, then three panels (with one button each ) inside. unit Mainm; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, uniGUITypes, uniGUIAbstractClasses, uniGUIClasses, uniGUImClasses, uniGUIRegClasses, uniGUIForm, uniGUImForm, uniGUImJSForm, unimPanel, uniGUIBaseClasses, unimScrollBox, uniButton, unimButton; type TMainmForm = class(TUnimForm) UnimScrollBox1: TUnimScrollBox; UnimPanel1: TUnimPanel; UnimPanel2: TUnimPanel; UnimPanel3: TUnimPanel; UnimButton1: TUnimButton; UnimButton2: TUnimButton; UnimButton3: TUnimButton; procedure UnimButton2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; function MainmForm: TMainmForm; implementation {$R *.dfm} uses uniGUIVars, MainModule, uniGUIApplication; function MainmForm: TMainmForm; begin Result := TMainmForm(UniMainModule.GetFormInstance(TMainmForm)); end; procedure TMainmForm.UnimButton2Click(Sender: TObject); begin //UnimButton1.WebFocus; Unimscrollbox1.ScrollInView(UnimButton1); //App Execption! //Unimscrollbox1.VertScrollBar.Position:=0; end; initialization RegisterAppFormClass(TMainmForm); end. Link to comment Share on other sites More sharing options...
Mqtt Posted March 8, 2018 Share Posted March 8, 2018 For three day now, i evaluated all other possibilities. Listboxes, Grids, Dbgrids... Every control has its own disadvantage. I'm sorry, but i need this function working for having a need for the whole unigui... Could you please take again a look for Unimscrollbox1.ScrollInView? Link to comment Share on other sites More sharing options...
Sherzod Posted March 8, 2018 Share Posted March 8, 2018 Hi, Can you try to use this approach for now?! For example: //Unimscrollbox1.ScrollInView(UnimButton1); //App Execption! UnimButton1.JSInterface.JSCode('document.getElementById('#1'.id).scrollIntoView(false);'); https://www.w3schools.com/Jsref/met_element_scrollintoview.asp Best regards, Link to comment Share on other sites More sharing options...
Mqtt Posted March 9, 2018 Share Posted March 9, 2018 Yes!!! Great!! Thank you very, very much! Link to comment Share on other sites More sharing options...
Mqtt Posted March 9, 2018 Share Posted March 9, 2018 Currently i got it working in UniScrollbox, but not Unimscrollbox (mobile). Could you check this, please? Link to comment Share on other sites More sharing options...
Sherzod Posted March 9, 2018 Share Posted March 9, 2018 Please make a simple testcase for this if possible ?! Link to comment Share on other sites More sharing options...
Recommended Posts