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

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