

![]() | 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.progRe: [prog] Alimenter un combobox - 00...| From | Sent On | Attachments |
|---|---|---|
| BRONCHART Philippe | Jan 21, 2006 1:24 pm | |
| Jovial | Jan 22, 2006 8:50 am | |
| Tony GALMICHE | Jan 22, 2006 9:44 am | |
| BRONCHART Philippe | Jan 22, 2006 11:17 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: | Re: [prog] Alimenter un combobox - 000 2.0 | Actions... |
|---|---|---|
| From: | Jovial (o.jo...@free.fr) | |
| Date: | Jan 22, 2006 8:50:29 am | |
| List: | org.openoffice.fr.prog | |
Bonjour
Regarde dans la documentation sur le site, il me semble qu'il y a un hows-to ou une macro Sinon dans O devis clic facture j'en charge plusieurs en voilà une voir sur http://fr.openoffice.org/servlets/ProjectDocumentList?folderID=259 pour le fonctionnement (OOo1.1.x)
Sub ChargeComDepart
Dim Depart as String, NumDepart as String, NomDepart as String Dim LaRequete as Object, LeResultSet as Object Dim LeResultat as Boolean Dim SQL as String, n as Integer Dim TabResult(600) as String Depart = DialBox.getControl("ComboDepartement").Model.Text 'ComboDepartement NumDepart = Left(Depart,2)'on récupere le chiffre NomDepart = Right(Depart,Len(Depart)-5) DialBox.getControl("Champ9").Model.Text = "Chargement liste en cours"
ConnecterSource SQL = "SELECT * FROM "& NomTableCP &" WHERE Depart = " & Quote(NumDepart)& " ORDER BY Commune" LaRequete=MaConnexion.createStatement() LaRequete.QueryTimeout=50 LeResultSet=laRequete.executeQuery(SQL) ' While LeResultSet.next if n > 600 then Redim preserve TabResult(n) End if 'c'est la variable tableau sera insée dans la liste *** TabResult(n)= LeResultSet.getColumns.getbyindex(0).String 'print n, TabResult(n) n= n+1 Wend Redim preserve TabResult(n) DeconnecterSource DialBox.getControl("Champ9").Model.StringItemList = TabResult() 'on remplit la chose *** DialBox.getControl("Champ9").Model.Text = ""
End Sub
jean-luc
BRONCHART Philippe a écrit :
Bonsoir à tous
Bon j’avance dans mon petit projet de registre. ( c’est mon premier sous OOO)
Pour ceux que ca intéresse : http://bronchart.free.fr <http://bronchart.free.fr/>
Ce que je cherche à réaliser :
Je voudrais que mon Combo ( combo destinataire) de la boite de dialogue « s’auto alimente au chargement de la boite de dialogue.
Sous Excel ca faisait un truc comme ca :
DerLig = Sheets("option").Range("A65536").End(xlUp).Row
For i = 2 To DerLig
With Me.ListBox1
.AddItem (Cells(i, 4).Value)
End With
Le code de dialogue 1 :
Sub lancedialogue
Dim Dlg As Object, bibli As Object
Dim monDialogue As Object, Validation As Integer
Dim champObjet As Object, champTypePiece as object, ChampObservation as Object, ChampDestinataire as Object
Validation = com.sun.star.ui.dialogs.ExecutableDialogResults.OK
bibli = DialogLibraries.GetByName("Standard")
monDialogue = bibli.GetByName("Dialog1")
Dlg = CreateUnoDialog(monDialogue)
champObjet = Dlg.GetControl("TextFieldObjet")
champTypePiece = Dlg.Getcontrol("ListBoxTypePiece")
ChampObservation = Dlg.Getcontrol("TextFieldObervation")
ChampDestinataire = Dlg.Getcontrol("ComboBoxDestinataire")
if Dlg.Execute = Validation then
Objet = champObjet.Text
TypePiece = champTypePiece.SelectedItem
Observation = ChampObservation.Text
Destinataire = ChampDestinataire.Text
end if
Dlg.Dispose
End Sub
Une idée ?
Amicalement
Philippe
------------------------------------------------------------------------
Antivirus avast! <http://www.avast.com>: message Sortant sain.
Base de donnees virale (VPS) : 0603-4, 20/01/2006 Analyse le : 21/01/2006 22:25:04 avast! - copyright (c) 1988-2005 ALWIL Software.







