Jump to content

How to ignore mouse events


xxxpilot

Recommended Posts

Hello All,

I would be grateful to get an idea on how to make child controls (in my case TUniLabel-type) to ignore all mouse events (such as clicks, move etc) since the parent control (TUniPageControl) is a handler for mouse events (FMX has HitTest for such situations).

Thank you

Link to comment
Share on other sites

20 hours ago, xxxpilot said:

I would be grateful to get an idea on how to make child controls (in my case TUniLabel-type) to ignore all mouse events (such as clicks, move etc) since the parent control (TUniPageControl) is a handler for mouse events (FMX has HitTest for such situations).

Hello,

Maybe you wanted this config?:

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniLabel1.JSInterface.JSConfig('disabled', [True]);
end;

 

Link to comment
Share on other sites

Perfecto! Works. Thanks a lot for this tip.

Your suggestion is way better than setting in inspector control's property Enabled:=False (I found yesterday that it makes same effect) but in design-time it applies "disabled" effect..

Am I understand correctly that JSConfig method applies values to ExtJS component config (JSProperty will correspond to ExtJS properties) and related information in details can be taken from ExtJS API docs https://docs.sencha.com/extjs/6.7.0/modern/Ext.html)?

 

Link to comment
Share on other sites

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