

![]() | 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: |
10 messages in org.openoffice.fr.progRe: [prog] Boîte de dialogue ne gelan...| From | Sent On | Attachments |
|---|---|---|
| gwenael.trellu | Feb 22, 2007 5:05 am | |
| yves dutrieux | Feb 22, 2007 2:53 pm | |
| Bob | Feb 22, 2007 3:32 pm | |
| gwenael.trellu | Feb 23, 2007 2:23 am | |
| xavier roguiez | Feb 23, 2007 3:02 am | |
| Bob | Feb 23, 2007 2:38 pm | |
| Bob | Feb 23, 2007 4:37 pm | |
| gwenael.trellu | Feb 25, 2007 6:55 am | |
| gwenael.trellu | Feb 26, 2007 9:16 am | |
| gwenael.trellu | Feb 27, 2007 5:35 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] Boîte de dialogue ne gelant pas le document (dialog non-modal) | Actions... |
|---|---|---|
| From: | Bob (mlo...@bobiciel.com) | |
| Date: | Feb 23, 2007 2:38:54 pm | |
| List: | org.openoffice.fr.prog | |
Bonsoir Gwenael,
Ce soir, j'ai essayé d'avancer à nouveau sur ce problème de boite "non-modal"
une autre piste interessante : http://www.oooforum.org/forum/viewtopic.phtml?t=31010
Apparament, en initialisant le Model de la boite de dialogue avec "com.sun.star.awt.UnoControlDialogModel", setVisible affiche la boite de façon permanente. Ne me demande pas pourquoi ce comportement, j'ai essayé de trouver une explication rationnelle dans l'api, mais sans succès :-(
Je me suis inspiré de ce post pour écrire le code suivant :
------------------------------------------------------------------------
global oDialogControl as object
sub DailogVisible DialogLibraries.loadLibrary("Standard") if isNull(oDialogControl) then oDialogModel = createUnoService( "com.sun.star.awt.UnoControlDialogModel" ) oDialogControl = createUnoDialog(DialogLibraries.Standard.Dialog1) ' rmq: si tu commentes la ligne ci-dessous, setVisible ne rend la fenêtre visible que durant un temps de rafraichissement, comme tu l'as constaté oDialogControl.setModel( oDialogModel ) end if oDialogControl.setVisible(true) end sub
' sub associée à un bouton "Fermer" sub DailogInVisible oDialogControl.setVisible(false) end sub
------------------------------------------------------------------------
Dans le cas, de mon application, le fait d'initialiser le Model à "com.sun.star.awt.UnoControlDialogModel" pose problème:-( Je n'arrive plus à accéder aux contrôles par leur nom !!!
Si tu avance sur le sujet, tiens nous au courant
Bonne nuit
Bob
gwenael.trellu a écrit :
J'ai trouvé une piste grâce aux conseils de Yves et Bob que je remercie.
Au lieu d'utiliser la commande Dlg.Execute(), il suffit de créer une boucle dans
lequel il y a la commande :
Dlg.setVisible(True)
car cette commande fait apparaitre la boîte de dialogue mais pendant un temps
'rafraichissement'.
J'ai créé un sous programme qui tourne le temps qu'une variable x atteigne une
valeur.
Il me reste plus qu'à capturer un évenement sur la boîte de dialogue pour
arrêter la boucle et le tour sera joué.
Je transmettrrais le code complet prochainement.
Gwen.
Envoyez vos cartes de voeux depuis www.laposte.net Elles seront ensuite distribuées par le facteur : pratique et malin !







