Jump to content

uniFrame scrolls to UniDBGrid at onCreate

Recommended Posts

Hi ..


i have a uniFrame .. on the Frame i have a lot of uniLabels and images and uniPanels and so on ..


on the Bottom  i have a small uniDBGrid ...



If i create the uniFrame - the frame is allways scrolled down to the uniDBGrid .. very annoying ;-)



How can i change this behavior?


ThanX for suggestions



Link to post
Share on other sites
  • 1 month later...
  • 2 years later...

I'm having the same problem. To reproduce the scenario, follow the steps below. My unigui version:

1) Create an empty project.
2) Put a UniSimplePanel with Align = alClient
3) Create an Unigui Frame
4) Put some simplepanels into the frame as Align = alTop and a unidbgrid below.
5) The dbgrid must be binded with a datasource and dataset to reproduce the scenario
6) Increase the height so that it will be greater than your screen
7) On FormCreate of MainForm, use the code below to create the frame.

var Frame1: TUniFrame1;
Frame1 = TUniFrame1.Create(Self);
Frame1.Align := alClient;
Frame1.Parent := UniSimplePanel1;

7) Run your code and see that your frame will be positioned on the dbgrid.

Ps: It will only occurs when your dataset has result.

Link to post
Share on other sites

I found a solution that is not so elegant.

1) set dbgrid with Visible = false.
2) On UniDBGrid AfterLoad put this code:
3) On UniFrame AjaxEvent put this code:

if (EventName = 'UniDBGrid1') then
        UniDBGrid1.Visible := true;


Link to post
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.

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