Jump to content

CollapseDirection in form create


Wilton Ergon

Recommended Posts

I need to change the orientation of the panel according to the operating system, if it is windows the panel must collapse to the left, if it is a cell phone it must collapse upwards,
it happens that to set this configuration on the panel (ColappeDirection) I can only do this in the form's create, and in this event, I can't get the operating system.

 

--on create

procedure TfrmMain.UniFormCreate(Sender: TObject);
var C : TUniClientInfoRec;
begin
C       :=UniApplication.ClientInfoRec;
if C.OSType<>'windows' then   //here in the create event, it does not return the operating system
  pnlFiltroReport.CollapseDirection  :=cdleft;

 

--on show

procedure TfrmMain.UniFormShow(Sender: TObject);   
var C : TUniClientInfoRec;
begin
C       :=UniApplication.ClientInfoRec;
if C.OSType<>'windows' then   
  pnlFiltroReport.CollapseDirection  :=cdleft; //here in the create event, not change CollapseDirection

 

 

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