Darth Florus Posted November 7, 2017 Share Posted November 7, 2017 Hi: There is a way to know if a panel that are into a accordion layout are visible or not? Or a OnTitleClick like event to know if a especific panel is visible or not? I try Collapsed, OnCollapse and OnExpand events a nothing of thesse works. Thanks to all and Best Regards Link to comment Share on other sites More sharing options...
Sherzod Posted November 8, 2017 Share Posted November 8, 2017 Hi, There is a way to know if a panel that are into a accordion layout are visible or not? Sorry, can you explain in more detail where do you want to use it? Best regards, Link to comment Share on other sites More sharing options...
Darth Florus Posted November 8, 2017 Author Share Posted November 8, 2017 Hi: I have to emulate on UniGui the behavior of our Win32 program. See the attached pictures to ilustrate to. In "First Page" You have a left panel with possible options to take a report on PDF, a Center panel where You configure you reports options. This center panel changes in according to the options You press on the left panel. Because there are to many options on the left panel is needed to use something like a Outlook bar to group them by type of report. The problem is... I can't detect when a accordion button is pressed, and also, I can't know what panel is on the front when the accordion button is pressed. I need this event because the center panel must change, when the group is changed to. You can see the sequence of use if you see the "First Page", "Second Page" and "Third Page" examples screenshots. I was use OnClick on the "groups panels" but if I click on the accordion button I can't detect it, and if I click twice on the same "Group Tittle" I don't know if the panel is showed or hidden. As resume I need to know what panel is "active" at a time. Best Regards Link to comment Share on other sites More sharing options...
Sherzod Posted November 8, 2017 Share Posted November 8, 2017 Hi, Maybe like this (need to optimize)?: 1. "MainPanel" (UniPanelA) -> ... -> function afterrender: function afterrender(sender, eOpts) { var me=sender; //me.layout.getLayoutItems().forEach... me.items.items.forEach(function(item){ //item.addListener('collapse', function(){ // ajaxRequest(me, '_expandorcollapse', ['uname='+me.layout.getExpanded()[0].uname]); //}); item.addListener('expand', function(){ ajaxRequest(me, '_expandorcollapse', ['uname='+me.layout.getExpanded()[0].uname]); }) }); } 2. "MainPanel" (UniPanelA) -> OnAjaxEvent: procedure TMainForm.UniPanelAAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_expandorcollapse' then ShowMessage(Params.Values['uname'] + ' expanded'); end; Best regards, Link to comment Share on other sites More sharing options...
Darth Florus Posted November 8, 2017 Author Share Posted November 8, 2017 Thank You! I think I can do something with this code. Best Regards Link to comment Share on other sites More sharing options...
Darth Florus Posted November 8, 2017 Author Share Posted November 8, 2017 Hi Pals: There is another aproach that is more Delphi-Like. Best Regards OutlookBar.zip Link to comment Share on other sites More sharing options...
SayeyeZohor Posted October 16, 2019 Share Posted October 16, 2019 how to show panel with index or order id ( according ) @Sherzod Link to comment Share on other sites More sharing options...
Sherzod Posted October 16, 2019 Share Posted October 16, 2019 21 minutes ago, SayeyeZohor said: how to show panel with index or order id Have you tried to use CreateOrder property for this? Panel1.CreateOrder = 1 Panel2.CreateOrder = 2 Panel3.CreateOrder = 3 ... 1 Link to comment Share on other sites More sharing options...
SayeyeZohor Posted October 16, 2019 Share Posted October 16, 2019 51 minutes ago, Sherzod said: Have you tried to use CreateOrder property for this? Panel1.CreateOrder = 1 Panel2.CreateOrder = 2 Panel3.CreateOrder = 3 ... tnx how to change first panel collapse = false procedure tf1.UniFormAfterShow(Sender: TObject); begin p1.Collapsed := False; p2.Collapsed := True; p3.Collapsed := True; end; not working ... Link to comment Share on other sites More sharing options...
Sherzod Posted October 16, 2019 Share Posted October 16, 2019 2 minutes ago, SayeyeZohor said: how to change first panel collapse = false I'm afraid not, because you are using AccordionLayout... Link to comment Share on other sites More sharing options...
SayeyeZohor Posted October 16, 2019 Share Posted October 16, 2019 4 minutes ago, Sherzod said: I'm afraid not, because you are using AccordionLayout... yes, Is there no way to show Panel 1 first? Link to comment Share on other sites More sharing options...
Sherzod Posted October 16, 2019 Share Posted October 16, 2019 Just now, SayeyeZohor said: yes, Is there no way to show Panel 1 first? Sorry, can you make a simple testcase providing details in the comments? Link to comment Share on other sites More sharing options...
SayeyeZohor Posted October 16, 2019 Share Posted October 16, 2019 53 minutes ago, Sherzod said: Sorry, can you make a simple testcase providing details in the comments? it is not possible please read private message ... Link to comment Share on other sites More sharing options...
Recommended Posts