Control Extensions

This forum is meant for questions and discussions about the X# language and tools
Post Reply
stecosta66
Posts: 89
Joined: Mon Sep 26, 2016 12:59 pm
Location: Italy

Control Extensions

Post 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
User avatar
wriedmann
Posts: 3784
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Re: Control Extensions

Post 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
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
stecosta66
Posts: 89
Joined: Mon Sep 26, 2016 12:59 pm
Location: Italy

Re: Control Extensions

Post 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
Post Reply