picker

Classes:

dir_picker(parent[, id, value, pos, size, …])

type parent

Window

file_folder_picker(parent[, id, value, pos, …])

type parent

Window

file_picker(parent[, id, value, pos, size, …])

type parent

Window

class dir_picker(parent, id=- 1, value='', pos=(- 1, - 1), size=(- 1, - 1), style=524288, name=b'dir_picker')[source]

Bases: TextCtrlWrapper, Panel

Parameters
  • parent (Window) – Parent window. Should not be None.

  • id – Default -1.

  • value – Default ''.

  • pos – Default (-1, -1).

  • size – Default (-1, -1).

  • style – Default 524288.

  • name – Default b'dir_picker'.

Methods:

Browse(*_)

Clear(*_)

Clears the text in the control.

GetInsertionPoint()

Returns the insertion point, or cursor, position.

ResetValue()

Resets the text ctrl to the initial value, either specified in __init__ or set with SetInitialValue.

SetHeight(height)

Set the height of the widgets

SetInitialValue(value)

Sets the initial value for the text ctrl.

SetInsertionPoint(pos)

Sets the insertion point at the given position.

SetInsertionPointEnd()

Sets the insertion point at the end of the text control.

SetTextWidth(width)

Sets the width of the TextCtrl.

get_value()

reset_value()

set_height(height)

set_textctrl_width(width)

Attributes:

Browse(*_)[source]
Clear(*_)[source]

Clears the text in the control.

Note that this function will generate a wxEVT_TEXT event, i.e. its effect is identical to calling SetValue (“”).

GetInsertionPoint()[source]

Returns the insertion point, or cursor, position.

This is defined as the zero based index of the character position to the right of the insertion point. For example, if the insertion point is at the end of the single-line text control, it is equal to GetLastPosition .

Return type

long

ResetValue()[source]

Resets the text ctrl to the initial value, either specified in __init__ or set with SetInitialValue.

SetHeight(height)[source]

Set the height of the widgets

Parameters

height (int) – Height of the widgets

SetInitialValue(value)[source]

Sets the initial value for the text ctrl.

Parameters

value (str) – Initial value for the text ctrl.

SetInsertionPoint(pos)[source]

Sets the insertion point at the given position.

Parameters

pos (int) – Position to set, in the range from 0 to GetLastPosition() inclusive.

SetInsertionPointEnd()[source]

Sets the insertion point at the end of the text control.

This is equivalent to calling wx.TextCtrl.SetInsertionPoint with wx.TextCtrl.GetLastPosition argument.

SetTextWidth(width)[source]

Sets the width of the TextCtrl.

Parameters

width (int) – The width of the TextCtrl.

get_value()[source]
reset_value()[source]
set_height(height)[source]
set_textctrl_width(width)[source]
textctrl

Type:    TextCtrl

class file_folder_picker(parent, id=- 1, value='', pos=(- 1, - 1), size=(- 1, - 1), style=524294, name=b'file_picker', extension='*', title='File Picker', filetypestring='All Files', start_as_files=True, **kwargs)[source]

Bases: dir_picker

Parameters
  • parent (Window) – Parent window. Should not be None.

  • id – Default -1.

  • value – Default ''.

  • pos – Default (-1, -1).

  • size – Default (-1, -1).

  • style – Default 524294.

  • name – Default b'file_picker'.

  • extension – Default '*'.

  • title – Default 'File Picker'.

  • filetypestring – Default 'All Files'.

  • kwargs

Methods:

Browse(*_)

set_files_mode()

set_folders_mode()

toggle_mode()

Attributes:

Browse(*_)[source]
set_files_mode()[source]
set_folders_mode()[source]
textctrl

Type:    TextCtrl

toggle_mode()[source]
class file_picker(parent, id=- 1, value='', pos=(- 1, - 1), size=(- 1, - 1), style=524294, name=b'file_picker', extension='*', title='File Picker', filetypestring='All Files', **kwargs)[source]

Bases: dir_picker

Parameters
  • parent (Window) – Parent window. Should not be None.

  • id – Default -1.

  • value – Default ''.

  • pos – Default (-1, -1).

  • size – Default (-1, -1).

  • style – Default 524294.

  • name – Default b'file_picker'.

  • extension – Default '*'.

  • title – Default 'File Picker'.

  • filetypestring – Default 'All Files'.

  • kwargs

Methods:

Browse(*_)

Attributes:

Browse(*_)[source]
textctrl

Type:    TextCtrl