PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 25 → COMO LISTAR TODOS OS OBJETOS CONTROLES DE UMA JANELA OU PAGE DO WX?
COMO LISTAR TODOS OS OBJETOS CONTROLES DE UMA JANELA OU PAGE DO WX?
Débuté par Boller, 02 sep. 2023 00:35 - Aucune réponse
Membre enregistré
3 659 messages
Popularité : +175 (223 votes)
Posté le 02 septembre 2023 - 00:35
// Summary: <specify the procedure action>
// Syntax:
//[ <Result> = ] evento_lista_objetos_gpw (<ninstancia>)
//
// Parameters:
// ninstancia: <specify the role of ninstancia>
// Example:
// <Specify a usage example>
//
// Return value:
PROCEDURE evento_lista_objetos_gpw(ninstancia)

//variaiveis auxiliares
i is int = 1
objs_form is string = ""
sControlName is string = ""
sControles is string = ""

ninstancia = ninstancia

<COMPILE IF Configuration<>"iOS application" AND Configuration<> "Android application">

IF ninstancia = 0 THEN

RESULT ""

ELSE

NomeForm is string = m_Tabela[ninstancia].gs_nomeJanela

WHEN EXCEPTION IN

sControlName = gpwEnumControl(NomeForm, i)

LOOP(5000)

// Process the control
Trace(sControlName)

// Next control
i++

sControlName = gpwEnumControl(NomeForm, i)

IF sControlName <> "" AND sControlName <> Null AND sControlName <> 0 AND sControlName <> VK_EREOF THEN
indirection is string = NoSpace(NomeForm) +"."+ NoSpace(sControlName)
IF ControlExist(sControlName) = True
sControles += indirection + "; "
END
ELSE
BREAK
END

END

RESULT sControles


DO
IF ExceptionInfo(errCode) THEN
RESULT sControles
END
END


END

<END>


--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/