ShowToolbar
function ShowToolbar(wsToolbarName: WideString): WordBool
Displays a toolbar if it's not already showing. Fails if the toolbar doesn't exist.
The JScript example below creates a toolbar named "Apps" if one doesn't exist already,
and then adds two custom toolbuttons to it. The first toolbutton launches Windows
Explorer, while the second one opens Windows Explorer at the current folder in the
editor:
function Main() {
var TB_NAME = 'Apps';
var app = Application;
if (!app.ToolbarExists(TB_NAME)) {
app.CreateToolbar(TB_NAME);
}
app.AddAppToolbutton(TB_NAME, 'c:\\windows\\explorer.exe', ",
'Explorer');
app.AddAppToolbutton(TB_NAME, 'c:\\windows\\explorer.exe',
app.CurrentFolder, 'Explorer - Current Folder');
}
Here's the same code in VBScript:
Sub Main
const TB_NAME = "Apps"
Dim app
set app = Application
if not app.ToolbarExists(TB_NAME) then
app.CreateToolbar TB_NAME
end if
app.AddAppToolbutton TB_NAME, "c:\windows\explorer.exe", "",
"Explorer"
app.AddAppToolbutton TB_NAME, "c:\windows\explorer.exe",
app.CurrentFolder, "Explorer - Current Folder"
End Sub
ToolbarDir
function ToolbarDir (widestring, read-only property)
Returns the path where toolbar files are located.
ToolbarExists
function ToolbarExists(wsToolbarName: WideString): WordBool;
Returns True if the passed toolbar exists.
205
Need help?
Do you have a question about the COLDFUSION STUDIO 4.5-USING COLDFUSION STUDIO and is the answer not in the manual?
Questions and answers