Obtener Nombre de Un Objeto // Get Object Name - Forum

Forum Navigation
You need to log in to create posts and topics.

Obtener Nombre de Un Objeto // Get Object Name

Necesitaría obtener el Nombre de un Objeto, por ejemplo: si pulso en mi aplicación sobre el PushButton1

que me almacene en una variable "PushButton1".

 

I need get "Object Name ", for example: if I press on PushButton1 that one variable store "PushButton1".

Objects -> GetObjectInfo

Quote from lolo on May 17, 2021, 12:00 pm

Objects -> GetObjectInfo

I can't use it because I don't know "Object Name", that is that I want get when I push on a Button

@rafamacor

I need get "Object Name ", for example: if I press on PushButton1 that one variable store "PushButton1".

Use the Global (Reserved) Variable named [Self]

From the Help file at https://winhelp.visualneo.com/PredefinedGlobalVariables.html ...

The name of the object that executed the currently running Action script. For scripts not executed by objects (such as page enter/exit), [Self] will be empty.

Muchas gracias, era lo que estaba buscando.
Thanks, that is.
Quote from Gaev on May 17, 2021, 6:33 pm

@rafamacor

I need get "Object Name ", for example: if I press on PushButton1 that one variable store "PushButton1".

Use the Global (Reserved) Variable named [Self]

From the Help file at https://winhelp.visualneo.com/PredefinedGlobalVariables.html ...

The name of the object that executed the currently running Action script. For scripts not executed by objects (such as page enter/exit), [Self] will be empty.

 

rafamacor

Pour une gestion simple de 3 objets ...

Claude GUYOT
"Thank you very much for loving this software as much as I do."
"Merci beaucoup d'aimé ce logiciel autant que moi."

 

Uploaded files:
  • You need to login to have access to uploads.

@rafamacor

Une autre approche pour des boutons dans un MessageBox (pour cet exemple au nombre de cinq boutons).

Les boutons dans un MessageBox non pas vraiment de NomObjet du fait qu'il sont inclus dans un MessageBox, alors en jouant avec des variables il est possible de leur créer un NomObjet à chacun de ces boutons.

... Ou pour une autre utilisation dans mon précédent post de pas faire apparaitre comme vrai Nom de l'objet "PushButton1" mais lui attribué un Nom d'objet de remplacement.

Voir l'exemple Pub.

Claude GUYOT
"Thank you very much for loving this software as much as I do."
"Merci beaucoup d'aimé ce logiciel autant que moi."

Uploaded files:
  • You need to login to have access to uploads.
farhad2008 has reacted to this post.
farhad2008