Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi FMX TMultiView als Navigationpane - Ist Collapesd oder nicht? (https://www.delphipraxis.net/188737-fmx-tmultiview-als-navigationpane-ist-collapesd-oder-nicht.html)

Sherlock 1. Apr 2016 10:24

FMX TMultiView als Navigationpane - Ist Collapesd oder nicht?
 
Liste der Anhänge anzeigen (Anzahl: 2)
Schwieriger Titel, hoffentlich leichte Frage: Wie finde ich bei einem Delphi-Referenz durchsuchenTMulitView, das als
Delphi-Quellcode:
Mode := NavigationPane
hat, heraus, ob es gerade zusammengeschoben ist, oder eben erweitert? Anbei zwei Bilder, was ich meine.

Sherlock

Sherlock 1. Apr 2016 10:43

AW: FMX TMultiView als Navigationpane - Ist Collapesd oder nicht?
 
IsShowed heisst die Methode... meine Güte, war das schwer zu finden. :D

Sherlock

Der schöne Günther 1. Apr 2016 10:45

AW: FMX TMultiView als Navigationpane - Ist Collapesd oder nicht?
 
Delphi-Quellcode:
procedure TForm3.Button4Click(Sender: TObject);
var
   isOpened: Boolean;
begin
   isOpened := TPresentationState.Opened in MultiView1.Presenter.State;
   if isOpened then Caption := 'is opened' else Caption := 'is closed';
end;
Edit:

Du warst schneller. IsShowed, wtf. IsShown wenn schon.

Sherlock 1. Apr 2016 10:48

AW: FMX TMultiView als Navigationpane - Ist Collapesd oder nicht?
 
Oha, über den Presenter abgefragt. Und wenn man in die Eingeweide (FMX.MultiView) blickt so findet man:
Delphi-Quellcode:
function TCustomMultiView.IsShowed: Boolean;
begin
  Result := HasPresenter and (TPresentationState.Opened in Presenter.State);
end;
Sherlock


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:41 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz