FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
Enumerating Controls on a Tab?
Enumerating Controls on a Tab?
Débuté par Tom, 01 jan. 2009 23:10 - 2 réponses
Connectez-vous…
Tom
#1
Posté le 01 janvier 2009 - 23:10
Hi folks,
Anyone point me in the right direction for the syntax of looping thru controls on a Tab, I did it on a window using enumcontrol() but found out that this is no use if the controls are on a Tab.
Thanks
Tom
Signaler
0
0
Jimbo
#2
Posté le 01 janvier 2009 - 23:11
Hi Tom, the controls on a Tab sit on
WindowName.Tab[1].ControlName
otherwise a recursive enumeration will help:
Here's an enumeration for all elements of a window
// Fill the table with all window controls
// Entry:
sParent
Name of parent element - in this case it is the Window's name!
Procedure
FillAll
(
s
Parent
)
// First window control
s
ControlName is
string
=
EnumSubElement
(
s
Parent
,
enumFirst
)
WHILE
s
ControlName
""
// Full control name
s
FullName is
string
=
s
Parent
+
"."
+
s
ControlName
// Retrieve the element type
n
Type is
int
=
{
s
FullName
,
indGPW
}
..
Type
// If this is a control group or a tab
IF
n
Type
=
typTab
OR
n
Type
=
typTable
OR
n
Type
=
typToolbar
THEN
// List the controls placed inside
FillAll
(
s
FullName
)
ELSE
// No action if this is a MENU item
IF
n
TypetypMenuOption
THEN
// Add the element to the table
AddElement
(
s
FullName
,
n
Type
,
{
s
FullName
,
indGPW
}
..
Caption
,
{
s
FullName
,
indGPW
}
..
Group
)
END
END
// Next control
s
ControlName
=
EnumSubElement
(
s
Parent
)
END
Regards,
Guenter
Signaler
0
0
Tom
#3
Posté le 02 janvier 2009 - 11:27
Guenter,
Thank you very much works a treat!
Tom
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte