Jump to content

Launching a grid and Focus


M477H13U

Recommended Posts

Hello uniGUI developpers ! (:

 

We would like to know if it could be possible to override the native focus(0,0) of the grid when it is create/refresh ?

 

The aim would be to focus a specific cell (saved in a profil: our logic) when grid is open/refresh instead of the first cell ..

 

How could I achieve somethink like that ?  -_-

 

Regards,

Link to comment
Share on other sites

Hello,

 

You can try these actions:

 

1. UniDBGrid1 -> Options -> dgDontShowSelected = True

 

2. UniDBGrid1 -> OnAfterLoad event:

procedure TMainForm.UniDBGrid1AfterLoad(Sender: TUniDBGrid);
begin
  with UniDBGrid1 do
  begin
    CurrRow := 5;
    CurrCol := 5;
  end;

end;
  • Upvote 1
Link to comment
Share on other sites

Thanks for the quick answer; I will try this a bit later!

 

I still have one question: What exactly does dgdontShowSelected ? Is it correlated to dgAlwaysShowSelection ? What is the difference ?

Nb: I did not found any detail on this option here http://www.unigui.com/doc/online_help/api/uniGUITypes_TUniDBGridOption.html

 

Regards,

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...