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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...