Page loading

Share your opinion
What do you think about gambaslinux.fr?
 
Interesting
It miss some informations
Excellent website
Results
WIDGETS GAMBAS
GAMBAS 3 SOFTWARES
TUTORIALS
Library
MESSAGEBOX - Dialog box
French only sorry...
Boite de dialogue ouverture de fichier


dialogbox.png
Bonjour,

Dans votre application, vous pourrez ajouter un bouton "Parcourir", pour chercher un fichier présent sur vos disques locaux par une boite de dialogue. Nous allons utiliser une "boite de dialogue".

Dans votre code de l'evenement Click de votre bouton inscrivez ce code :

PUBLIC SUB Button1_Click()
Dialog.Filter = ["*.jpg", "Fichiers JPEG", ".png", "Fichiers PNG", ".xpm", "Fichiers XPM"] 'defini le filtre d'extention
Dialog.Title = "Ouvrir unfichier" 'defini le titre de la boite
Dialog.Path = Application.Path 'defini le chemin par defaut à l'ouverture
IF Dialog.OpenFile() THEN RETURN 'si on ne peut ouvrir le fichier alors ne rien faire
END

Voila ! cet exemple commenté est simple et vous aidera à concevoir vos projets.

Pour aller un peu plus loin, vous pouvez consulter la doc ici :
http://gambasdoc.org/help/comp/gb.form.dialog/dialog/openfile

A bientôt

wink

Creation date : 24/05/2010 @ 13:54
Last update : 17/02/2022 @ 01:17
Category : MESSAGEBOX
Page read 5084 times


Print the article Print the article


react.gifReactions to this article

Nobody gave a comment yet.
Be the first one to do it!


QUICK MENU
SEARCH




LANGUAGE
COMPONENTS
Other
LANGUAGE
Where, who?
VISITS

   visitors

   visitors online

ARCHIVES GAMBAS 1/2
^ Top ^