Jump to content


Photo

Track changing visibility


  • Please log in to reply
4 replies to this topic

#1 Volk65

Volk65

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 63 posts
  • LocationMSK, Russia

Posted 13 March 2018 - 09:52 AM

Hi all.

 

How to track change the visibility of the UniFrame?
When changing to visible:=True|False;


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4968 posts

Posted 13 March 2018 - 09:59 AM

Hi,

 

Sorry, can you clarify your question ?!


  • 0

#3 Volk65

Volk65

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 63 posts
  • LocationMSK, Russia

Posted 13 March 2018 - 10:08 AM

When I change UniFrame.Visible True or False.

I need to call my procedure, for example: procedure OnFrameVisibleChanged(....);

UniFrame does not have events like the form: OnShow, OnHide.


  • 0

#4 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4968 posts

Posted 13 March 2018 - 10:23 AM

You can use ClientEvents for this, hide and show functions


  • 0

#5 Volk65

Volk65

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 63 posts
  • LocationMSK, Russia

Posted 13 March 2018 - 11:19 AM

I did that. Is that right?

1.ClientEvents -> ExtEvents -> beforehide

function beforehide(sender, eOpts)
{
  var me=sender;
  ajaxRequest(me, '_hide', []);
}

2. OnAjaxEvent

procedure TRootFrame.UniFrameAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings);
var RetVal: Integer;
begin
  if EventName = '_hide' then
    FrameMessage(FM_HIDE, 0, 0, RetVal);
end;

Thanks. It works.


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users