Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there something better than GetDir()
Message
 
À
01/08/2003 03:39:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00815756
Message ID:
00815763
Vues:
19
Hi Luigi,

You can use Pdm.fll from PDM file#9428. This fll library contain function GetDirEx() and support rename button on dialog.

Using:
LOCAL loDir
loDir=CREATEOBJECT("_GetDirEx")

* If property btnND,btnOK or btnCancel empty,
* then default caption of buttons are not change.

* Window Title
loDir.WTitle=ALLT(This.Parent.txtWTitle.Value)

* Dialog Title
loDir.Title=ALLT(This.Parent.txtTitle.Value) 

* New caption of button "Make New Folder"
loDir.btnND=ALLT(This.Parent.txtbtnND.Value)

* New caption of button "OK"
loDir.btnOK=ALLT(This.Parent.txtbtnOK.Value)

* New caption of button "Cancel"
loDir.btnCancel=ALLT(This.Parent.txtbtnCancel.Value)

* Default directory
loDir.DefaultDir=ALLT(This.Parent.txtDefaultDir.Value)

* For Shell version 5.0
loDir.NewFolderAllowed=This.Parent.chkNewFolderAllowed.Value

* If Default directory is root, same as parametr lReadOnly
* in function GetDir() in VFP 7.0
loDir.IsRoot=This.Parent.chkIsRoot.Value

* Member ulFlags in struc.
* BROWSEINFO (FLL function always insert BIF_USENEWUI if NewFolderAllowed=.T.)
*loDir.Flag=16+4

IF GetDirEx(loDir)
   This.Parent.txtOutPutDir.Value=loDir.OutPutDir
ENDIf



****************************************************************
* Definiton class _GetDirEx for function GetDirEx()
****************************************************************
DEFINE CLASS _GetDirEx AS custom

   * If property btnND,btnOK or btnCancel empty,
   * then default caption of buttons are not change.
   WTitle="" && Window Title
   Title="" && dialog Title

   NewFolderAllowed=.T. && For Shell version 5.0

   Flag=0 && Member ulFlags in struc.
          *BROWSEINFO (FLL function always insert BIF_USENEWUI if NewFolderAllowed=.T.)

   btnND="" && New caption of button "Make New Folder"
   _btnND_ID=0x3746 && Control ID of button "Make New Folder".
                    * Don't change !!!

   btnOK="" && New caption of button "OK"
   _btnOK_ID=0x1 && Control ID of button "OK". Don't change !!!

   btnCancel="" && New caption of button "Cancel"
   _btnCancel_ID=0x2 && Control ID of button "Cancel". Don't change !!!

   DefaultDir="" && Default directory

   OutPutDir="" && Output directory

   IsRoot=.F. && If Default directory is root,
   * same as parametr lReadOnly in function GetDir() in VFP 7.0
ENDDEFINE
MartinJ

>Hi at all,
>
>I am using the function =getdir() but some customers complain becase the program is in Italina and this form is in English, is ther any possibilitry to translate the form or is there any other form doing the same task with source code?
>
>Tahnk in advance
>Luigi
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform