Difference between revisions of "GUIFilePicker"

From Virtual World Web Wiki
Jump to: navigation, search
(Documentation for the GUIFilePicker class)
(Documentation for the GUIFilePicker class)
Line 1: Line 1:
 +
Component representing a text field you can use to browse for files from
 +
 
*'''Inherits class: [[GUIComponent]]'''
 
*'''Inherits class: [[GUIComponent]]'''
 
* This is a JavaScript visible object
 
* This is a JavaScript visible object
Line 6: Line 8:
 
===Properties===
 
===Properties===
 
:{{CSharp|GUISprite BackgroundTexture {get;} }}
 
:{{CSharp|GUISprite BackgroundTexture {get;} }}
 +
::
 +
::Reference to the background sprite of this file picker
  
 
:{{CSharp|GUIButton Button {get;} }}
 
:{{CSharp|GUIButton Button {get;} }}
 +
::
 +
::Reference to the browse button
  
 
:{{CSharp|bool CanReset {get; set;} }}
 
:{{CSharp|bool CanReset {get; set;} }}
 +
::
 +
::Whether or not to allow the reset button to appear
  
 
:{{CSharp|bool Enabled {get; set;} }}
 
:{{CSharp|bool Enabled {get; set;} }}
 
 
:{{CSharp|string FileFilter {get; set;} }}
 
:{{CSharp|string FileFilter {get; set;} }}
 +
::
 +
::The file filter to use for which files to suggest to the user
  
 
:{{CSharp|string FullPath {get; set;} }}
 
:{{CSharp|string FullPath {get; set;} }}
 +
::
 +
::Gets or sets the server-ready path for the file
  
 
:{{CSharp|string InitialDir {get; set;} }}
 
:{{CSharp|string InitialDir {get; set;} }}
 +
::
 +
::The initial directory to start searching form
  
 
:{{CSharp|string Path {get; set;} }}
 
:{{CSharp|string Path {get; set;} }}
 +
::
 +
::The displayed value of the PathField
  
 
:{{CSharp|GUITextField PathField {get;} }}
 
:{{CSharp|GUITextField PathField {get;} }}
 +
::
 +
::Reference to the text field that holds the file path
  
 
:{{CSharp|float Progress {get; set;} }}
 
:{{CSharp|float Progress {get; set;} }}
 +
::
 +
::Sets a percentage progress to display for the file
  
 
:{{CSharp|GUIPanel ProgressBar {get;} }}
 
:{{CSharp|GUIPanel ProgressBar {get;} }}
 +
::
 +
::Reference to the containing progress bar for file uploads
  
 
:{{CSharp|GUIPanel ProgressCompleted {get;} }}
 
:{{CSharp|GUIPanel ProgressCompleted {get;} }}
 +
::
 +
::Reference to the completed part of the progress bar
  
 
:{{CSharp|GUIPanel ProgressRemaining {get;} }}
 
:{{CSharp|GUIPanel ProgressRemaining {get;} }}
 +
::
 +
::Reference to the remaining part of the progress bar
  
 
:{{CSharp|GUIButton ResetButton {get;} }}
 
:{{CSharp|GUIButton ResetButton {get;} }}
 +
::
 +
::Reference to the reset button to clear the current file
  
 
:{{CSharp|ResourceValue ResourceUri {get; set;} }}
 
:{{CSharp|ResourceValue ResourceUri {get; set;} }}
 +
::
 +
::The ResourceUri of the file (can be set with URLs or full ResourceValues)
  
 
===Events===
 
===Events===
 
:{{CSharp|OnFileChosen()}}
 
:{{CSharp|OnFileChosen()}}
 +
::
 +
::Event fired when the user picks a new file
  
 
===Methods===
 
===Methods===
 
:{{CSharp|void Reset()}}
 
:{{CSharp|void Reset()}}
 +
::
 +
::Resets the file picker to no file selected
  
 
__NOTOC____NOEDITSECTION__
 
__NOTOC____NOEDITSECTION__

Revision as of 12:55, 26 May 2017

Component representing a text field you can use to browse for files from

  • Inherits class: GUIComponent
  • This is a JavaScript visible object

Remarks [edit]

Properties

GUISprite BackgroundTexture {get;}
Reference to the background sprite of this file picker
GUIButton Button {get;}
Reference to the browse button
bool CanReset {get; set;}
Whether or not to allow the reset button to appear
bool Enabled {get; set;}
string FileFilter {get; set;}
The file filter to use for which files to suggest to the user
string FullPath {get; set;}
Gets or sets the server-ready path for the file
string InitialDir {get; set;}
The initial directory to start searching form
string Path {get; set;}
The displayed value of the PathField
GUITextField PathField {get;}
Reference to the text field that holds the file path
float Progress {get; set;}
Sets a percentage progress to display for the file
GUIPanel ProgressBar {get;}
Reference to the containing progress bar for file uploads
GUIPanel ProgressCompleted {get;}
Reference to the completed part of the progress bar
GUIPanel ProgressRemaining {get;}
Reference to the remaining part of the progress bar
GUIButton ResetButton {get;}
Reference to the reset button to clear the current file
ResourceValue ResourceUri {get; set;}
The ResourceUri of the file (can be set with URLs or full ResourceValues)

Events

OnFileChosen()
Event fired when the user picks a new file

Methods

void Reset()
Resets the file picker to no file selected