Python Reference Guide
 
Loading...
Searching...
No Matches
UI\FBFolderPopup.py
1# Copyright 2009 Autodesk, Inc. All rights reserved.
2# Use of this software is subject to the terms of the Autodesk license agreement
3# provided at the time of installation or download, or which otherwise accompanies
4# this software in either electronic or hard copy form.
5#
6# Topic: FBFolderPopup, FBFilePopupStyle
7#
8
9from pyfbsdk import FBFolderPopup, FBFilePopupStyle, FBMessageBox
10
11# Create the popup and set necessary initial values.
12lFp = FBFolderPopup()
13lFp.Caption = "FBFolderPopup example: Select a folder"
14
15# Set the default path. Good for a PC only... will have to be different for Mac.
16lFp.Path = r"C:\Program Files"
17
18# Get the GUI to show.
19lRes = lFp.Execute()
20
21# If we select a folder, show its name, otherwise indicate that the selection was canceled.
22if lRes:
23 FBMessageBox( "FBFolderPopup example", "Selected folder:\n Path: '%s'" % lFp.Path, "OK" )
24else:
25 FBMessageBox( "FBFolderPopup example", "Selection canceled", "OK" )
26
27# Cleanup
28del( lFp, lRes, FBFolderPopup, FBFilePopupStyle, FBMessageBox )
Folder Popup (for selecting a directory).
Definition: pyfbsdk_generated.h:8126
int FBMessageBox(str pBoxTitle, str pMessage, str pButton1Str, str pButton2Str=None, str pButton3Str=None, int pDefaultButton=0, int pScrolledMessage=0)
Dialog popup box.