6 messages in org.openoffice.fr.progRe: [prog] Nommer des boutons
FromSent OnAttachments
christianwtdDec 18, 2005 12:11 pm 
christianwtdDec 18, 2005 12:14 pm 
FeanorDec 18, 2005 1:43 pm 
christianwtdDec 18, 2005 2:02 pm 
Laurent GodardDec 18, 2005 11:13 pm 
christianwtdDec 19, 2005 1:46 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [prog] Nommer des boutonsActions...
From:Feanor (fean@free.fr)
Date:Dec 18, 2005 1:43:56 pm
List:org.openoffice.fr.prog

christianwtd a écrit :

christianwtd a écrit :

Je redonne la macro en espérant qu'elle passe mieux:

Sub theNiceButton oDlg = DialogLibraries.Standard.Dialog1 oDlgControl = CreateUnoDialog( oDlg ) for i% = 1 to n ' n = nbre de boutons de la série à gérer oButton = oDlgControl.GetControl( "CommandButton" & i% ) MsgBox oButton.model.label next i% End Sub

Bon surf, Christian

Bonjour. oButton = oDlgControl.GetControl( "CommandButton" & i% ) << donc les boutons doivent êtres nommés "CommandButton1" puis 2 puis 3 ... Donc si tu change les noms des boutons, d'une part faut que tu change tout les noms pour qu'ils aient la même racine (cmdButton au lieu de CommandButton par exemple) puis que tu modifie la ligne recopiée au dessus pour que la nouvelle racine change aussi ("oButton = oDlgControl.GetControl( "cmdButton" & i% )" pour coller a l'exemple) En espérant avoir répondu à ta question :)

Baptiste