Hi; I need the user to select a folder or sub-folder via a dialog, but when I set BrowseStyle to fbFolder the return string in Filename contains the PARENT folder not the subfolder
eg: C:\Folder\Sub-Folder
Selecting the Sub-Folder via the dialog returns C:\Folder in the Filename property
I'm using Version 12.1.4
Thanks in advance
BrowseStyle property gets parent folder NOT Sub-Folder
Moderators: Dorian (MJT support), JRL
-
- Newbie
- Posts: 15
- Joined: Wed Dec 19, 2007 9:16 pm
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
I'm not seeing that. This script correctly shows me the path of the folder selected:
Code: Select all
Dialog>Dialog1
object Dialog1: TForm
Left = 737
Top = 319
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'CustomDialog'
ClientHeight = 223
ClientWidth = 439
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
ShowHint = True
OnTaskBar = False
PixelsPerInch = 96
TextHeight = 13
object Edit1: TEdit
Left = 80
Top = 25
Width = 121
Height = 21
TabOrder = 8
Text = 'Edit1'
end
object MSButton1: tMSButton
Left = 217
Top = 20
Width = 75
Height = 25
Caption = 'MSButton1'
DoubleBuffered = True
ParentDoubleBuffered = False
TabOrder = 9
DoBrowse = False
BrowseStyle = fbFolder
end
end
EndDialog>Dialog1
AddDialogHandler>Dialog1,MSButton1,OnClick,DoBrowse
Show>Dialog1,r
SRT>DoBrowse
SetDialogProperty>Dialog1,MSButton1,DoBrowse,True
GetDialogProperty>Dialog1,MSButton1,Filename,strFileName
SetDialogProperty>Dialog1,Edit1,Text,strFileName
END>DoBrowse
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 15
- Joined: Wed Dec 19, 2007 9:16 pm