StandardFileDialog.SetStyle Method (Typed) | |
Set the style for the dialog window.
Namespace:
XSharp.VO.SDK
Assembly:
XSharp.VOGUIClasses (in XSharp.VOGUIClasses.dll) Version: 2.21
Syntax VIRTUAL METHOD SetStyle(
kStyle AS LONG,
lOnOff AS LOGIC
) AS VOID
public virtual void SetStyle(
int kStyle,
[DefaultParameterValueAttribute(true, 0)] bool lOnOff
)
Request Example
View SourceParameters
- kStyle
- Type: Long
The capability to be queried, specified by a Windows API OpenFileName flag constant (for example, OFN_ALLOWMULTISELECT). - lOnOff
- Type: Logic
A logical value that specifies whether the style setting is turned on or off. A value of TRUE means that the style setting is turned on; a value of FALSE means that it is set off. The default is TRUE.
Remarks
The style of the dialog windows for the OpenFile and SaveAs dialogs may be customize through the use of the SetStyle() method. Refer to the Windows API constants documented in the Microsoft Win32 Software Development Kit.
Examples
This example removes the ReadOnly check box from the dialog window, allows multiple file selection and retains current directory setting in effect prior to the dialog:
1METHOD MyOpen() CLASS StandardShellWindow
2LOCAL oOpenDialog AS OpenDialog
3oOpenDialog:=OpenDialog{SELF}
4oOpenDialog:SetStyle(OFN_ALLOWMULTISELECT)
5oOpenDialog:SetStyle(OFN_NOCHANGEDIR)
6oOpenDialog:SetStyle(OFN_HIDEREADONLY)
7oOpenDialog:Show()
Tip |
---|
If <oStandardFileDialog>:SetStyle(OFN_SHOWHELP) is used, a "Help" push button is created on the dialog box. A <oStandardFileDialog>:Help() method needs to be created to process the event associated with a user clicking on the "Help" button. |
See Also