13 messages in org.openoffice.fr.progRe: [prog] Remplir un combo ooo2.01
FromSent OnAttachments
JovialJan 28, 2006 3:14 am 
BRONCHART PhilippeJan 30, 2006 11:26 am 
oo...@volcar.orgJan 30, 2006 12:57 pm 
BRONCHART PhilippeJan 30, 2006 2:05 pm 
Bernard MarcellyJan 31, 2006 12:10 am 
BRONCHART PhilippeFeb 6, 2006 4:41 am 
JovialFeb 6, 2006 12:39 pm 
Arnaud POUSSIERFeb 12, 2006 10:17 am 
Catherine BancillonFeb 13, 2006 1:50 am 
Catherine BancillonFeb 13, 2006 1:55 am 
Catherine BancillonFeb 13, 2006 2:02 am 
Didier Dorange-PattoretFeb 13, 2006 3:28 am 
BRONCHART PhilippeFeb 13, 2006 1:19 pm 
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] Remplir un combo ooo2.01Actions...
From:Jovial (o.jo@free.fr)
Date:Jan 28, 2006 3:14:52 am
List:org.openoffice.fr.prog

Il me semble que additem ne fonctionne pas avec les combos (voir avec Xray) Il faut travailler sur la liste, tu remplis une variable tableau et tu l'atribue de la manière suivante

Form.getByName("CtrlNom").StringItemList = Tabl()

BRONCHART Philippe a écrit :

Bonjour à tous

J’ai un souci avec mon code qui me revoit une erreur. Ce doit être un souci de variable, mais je ne comprends pas

Dim i As integer

Dim oSheets As Object

Dim combo as String

Odocument=ThisComponent

oSheet = oDocument.Sheets.getByName("Config")

bibli = DialogLibraries.GetByName("Standard")

monDialogue = bibli.GetByName("Dialog2")

Odialog = CreateUnoDialog(monDialogue)

‘ On alimente le combo avec la plage de cellule de la colonne A ( de la feuille config)

Do While oSheet.getCellByPosition(0, i).String <> "" ‘ tant que la cellule de la colonne A n’est pas vide

oDialog.getControl(Combo).additem(oSheet.getCellByPosition(0, i).String, oDialog.getControl(Combo).ItemCount) ‘ on alimente le combo

i = i + 1

Loop

End Sub

Une idée ?

Amicalement Philippe

------------------------------------------------------------------------

Antivirus avast! <http://www.avast.com>: message Sortant sain.

Base de donnees virale (VPS) : 0605-0, 29/01/2006 Analyse le : 30/01/2006 20:27:24 avast! - copyright (c) 1988-2005 ALWIL Software.