Jump to content

TUniCustomPanel collapse/expand Events do not update Collapsed property


Recommended Posts

Posted

In uniAlignmentClient mode, when doesn't exist events OnCollapse or OnExpand, property Collapsed not updated.

In our logic we rely on this property. In order for this to work, we have to make empty handlers OnCollapse/OnExpand.

Maybe there is another way or to reconsider this?

procedure TUniCustomPanel.InitCollapseEvents;
var
  sSide: Boolean;
begin
  sSide := Assigned(UniParent) and (UniParent.AlignmentControl = uniAlignmentServer);

  if sSide or Assigned(FOnCollapse) then
    JSAddEvent('collapse', ['w', '%0.getWidth()', 'h', '%0.getHeight()'], H_JSOnCollapse);

  if sSide or Assigned(FOnExpand) then
    JSAddEvent('expand', ['w', '%0.getWidth()', 'h', '%0.getHeight()'], H_JSOnCollapse);
end;

I think it's worth considering a universal mechanism for subscribing to Ajax events. Some list of all events and checkboxes on them. Whoever needs them can uncheck them so they don't come. For all components.

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