Please enable JavaScript to view this site.

KOL/MCK - User Guide

TOpenDirDialog( unit KOL.pas ) TObj _TObj

TOpenDirDialog = object( TObj )

Dialog for open directories, uses SHBrowseForFolder.

 

type TOpenDirOption =( odBrowseForComputer, odBrowseForPrinter, odDontGoBelowDomain, odOnlyFileSystemAncestors, odOnlySystemDirs, odStatusText, odBrowseIncludeFiles, odEditBox, odNewDialogStyle );

Flags available for TOpenDirDialog object.

 

type TOpenDirOptions = set of TOpenDirOption;

Set of all flags used to control ZOpenDirDialog class.

 

type TOnODSelChange = procedure( Sender: POpenDirDialog; NewSelDir: PKOL_Char; var EnableOK: Integer; var StatusText: KOL_String ) of object;

Event type to be called when user select another directory in OpenDirDialog. Set EnableOK to -1 to disable OK button, or to +1 to enable it. It is also possible to set new StatusText string.

 

 

Constructor

 

function NewOpenDirDialog( const Title: KOLString; Options: TOpenDirOptions ): POpenDirDialog;

Creates object, which can be used (several times) to open directory selecting dialog (using SHBrowseForFolder API call).

 

 

TOpenDirDialog properties

 

property Title: KOLString;

Title for a dialog.

 

property Options: TOpenDirOptions;

Option flags.

 

property Path: KOLString;  

Resulting (selected by user) path.

 

property InitialPath: KOLString;

Set this property to a path of directory to be selected initially in a dialog.

 

property CenterOnScreen: Boolean;

Set it to True to center dialog on screen.

 

property WndOwner: HWnd;

Owner window. If you want to provide your dialog visible over stay-on-top form, fire it as a child of the form, assigning the handle of form window to this property first.

 

property DialogWnd: HWnd;  

Handle to the open directory dialog itself, become available on the first call of callback procedure (i.e. on the first call to OnSelChanged).

 

 

TOpenDirDialog methods

 

destructor Destroy; virtual;

Destructor

 

function Execute: Boolean;

Call it to select directory by user. Returns True, if operation was not cancelled by user.

 

 

TOpenDirDialog events

 

property OnSelChanged: TOnODSelChange;

This event is called every time, when user selects another directory. It is possible to enable/disable OK button in dialog and/or change dialog status text in response to event.

 

KOL / MCK User Guide - Created by Carl Peeraer - Diamant Soft, based on the work of Vladimir Kladov - Artwerp.be

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Nav Header: ALT+n
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Exit Menu/Up: ESC