xsharp.eu • Control Extensions
Page 1 of 1

Control Extensions

Posted: Mon Dec 09, 2024 8:48 am
by stecosta66
Hi all

I've the following code in VO:

Code: Select all

ACCESS Enabled CLASS Control

RETURN IsWindowEnabled(SELF:Handle())
how can make it work in X#?
I tried

Code: Select all

STATIC CLASS ControlExtensions
	STATIC ACCESS Enabled AS LOGIC

	RETURN IsWindowEnabled(SELF:Handle())

END CLASS
but I don't know how to pass SELF to the ACCESS

Thanks!
Stefano

Re: Control Extensions

Posted: Mon Dec 09, 2024 8:56 am
by wriedmann
Ciao Stefano,
unfortunately there is no possibility to do that for properties (i.e. access/assign).
But the control class has a property "IsEnabled".
Wolfgang

Re: Control Extensions

Posted: Mon Dec 09, 2024 12:02 pm
by stecosta66
Ciao Wolfgang,

ah thanks, this helps a lot!

Stefano

wriedmann wrote: Mon Dec 09, 2024 8:56 am Ciao Stefano,
unfortunately there is no possibility to do that for properties (i.e. access/assign).
But the control class has a property "IsEnabled".
Wolfgang