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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...