Jump to content

TUnimContainerPanel or TUnimPanel enabled=false not working


Recommended Posts

Hi. I'm testing Unigui Mobile and I'm using Trial 1.90.0.1565, I have tried enabled:=false on Panel and ContainerPanel, and this not disable child components, am I doing something wrong?
Have some workaround?

Thanks! I'm old Delphi developer but new on Unigui framework.

 

Link to comment
Share on other sites

Hello,

Thank you for your interest in uniGUI.

Try this workaround for now:

procedure TMainmForm.UnimFormCreate(Sender: TObject);
begin
  with UnimPanel1 do
  begin
    JSInterface.JSAddListener('disabledchange', 'function(me, value){me.getRefItems().forEach(function(item){if (item.isComponent && item.isEnabled) {item.setDisabled(value)}})}');
    JSInterface.JSAddListener('painted', 'function(me){me.fireEvent("disabledchange", me, me.getDisabled())}');
  end;
end;

 

Link to comment
Share on other sites

  • 8 months later...
×
×
  • Create New...