

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
4 messages in org.openoffice.fr.progCalc - boutons macro| From | Sent On | Attachments |
|---|---|---|
| LE MOULEC Jacques | May 4, 2007 12:09 am | |
| oo...@volcar.org | May 4, 2007 9:39 am | |
| oo...@volcar.org | May 4, 2007 9:45 am | |
| Bernard Marcelly | May 4, 2007 11:20 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Calc - boutons macro | Actions... |
|---|---|---|
| From: | LE MOULEC Jacques (jacq...@cnasea.fr) | |
| Date: | May 4, 2007 12:09:07 am | |
| List: | org.openoffice.fr.prog | |
Bonjour,
Je cherche les fonctionnalites pour creer un bouton macro en mode programmation.
J'ai trouve, en tatonnant + avec le livre OOo programmation (version 1) les elements suivants :
Sub bouton
Dim Feuille as object, PageGraphique as object, TypeBouton as object Dim button_model as object, monForm as object Dim aPos as new com.sun.star.awt.Point Dim aSize as new com.sun.star.awt.Size dim unEvent as new com.sun.star.script.ScriptEventDescriptor
Feuille = ThisComponent.Sheets.getByName("Feuille1") PageGraphique = Feuille.getDrawPage() TypeBouton = ThisComponent.createInstance("com.sun.star.drawing.ControlShape")
'Position en 1/1000 de pouce => 1 pouce = 2540 aPos.X = 17500 aPos.Y = 500 TypeBouton.Position = aPos 'Taille aSize.Width = 6000 aSize.Height = 1600 TypeBouton.Size = aSize
button_model = ThisComponent.createInstance("com.sun.star.form.component.CommandButton") button_model.Name = "PushButton" button_model.Label = "Edition" 'button_model.Tag = 16711935 button_model.FontHeight = 15 'taille police button_model.FontName = "Arial" 'nom police
'button_model.Tag = RGB(0,0,0) button_model.HelpText = "Mise à jour de la valeur du stock dans la fiche principale"
TypeBouton.Control = button_model PageGraphique.add(TypeBouton)
'unEvent.ListenerType = "com.sun.star.awt.XMouseListener" 'unEvent.EventMethod = "mouseReleased" 'unEvent.ScriptType = "StarBasic" 'unEvent.ScriptCode = "ArmOOor601.Module2.Test"
'monForm = PageGraphique.Forms.getByName( "Standard") 'monForm.registerScriptEvent(monForm.Count - 1, unEvent)
End Sub
il me manque : 1- affecter une couleur au bouton (qu'est-ce que button_model.Tag ?) 2- mettre la police du titre (Label) en gras 3- ... et toutes autres informations utiles.
Merci.
***********************************************************************************************************************
Ce message peut contenir des INFORMATIONS CONFIDENTIELLES destinées à l'usage
exclusif du
destinataire. Si vous le receviez par erreur, merci de bien vouloir nous en
avertir immédiatement par téléphone
ou messagerie,de le détruire et de n'en divulguer le contenu à personne.
This message may contain CONFIDENTIAL INFORMATION intended only for use by the
addressee. If you
have received it by mistake, thank you for notifying us immediately by telephone
or by e-mail,and please,
delete it and do not deliver it to anyone else.
***********************************************************************************************************************







