Jump to content
uniGUI Discussion Forums
WillemvanZyl

Scroll to a specific control in scroll box

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
Share on other sites

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.

 

 

 

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Currently i got it working in UniScrollbox, but not Unimscrollbox (mobile). Could you check this, please?

Share this post


Link to post
Share on other sites

×