11

апр

The SetForegroundColor might work on one OS and not on another. It depends on the native widget. I would set the TextCtrl's style flag to wx.

HomeTreesIndexHelp

[frames no frames]

Type SearchCtrl


A search control is a composite of a wx.TextCtrl with optionalbitmap buttons and a drop-down menu. Controls like this can typicallybe found on a toolbar of applications that support some form of searchfunctionality. On the Mac this control is implemented using thenative HISearchField control, on the other platforms a generic controlis used, although that may change in the future as more platformsintroduce native search widgets.

If you wish to use a drop-down menu with your wx.SearchCtrl then youwill need to manage its content and handle the menu events yourself,but this is an easy thing to do. Simply build the menu, pass it toSetMenu, and also bind a handler for a range of EVT_MENU events.This gives you the flexibility to use the drop-down menu however youwish, such as for a history of searches, or as a way to selectdifferent kinds of searches. The ToolBar.py sample in the demo showsone way to do this.

Since the control derives from wx.TextCtrl it is convenient to usethe styles and events designed for wx.TextCtrl. For example you canuse the wx.TE_PROCESS_ENTER style and catch thewx.EVT_TEXT_ENTER event to know when the user has pressed theEnter key in the control and wishes to start a search.

EVT_SEARCHCTRL_SEARCH_BTNSent when the search icon is clicked
EVT_SEARCHCTRL_CANCEL_BTNSent when the cancel icon is clicked
EVT_TEXTSent when the text changes
EVT_TEXT_ENTERSent when the RETURN/ENTER key is pressedin the search control and the control hasthe wx.TE_PROCESS_ENTER style flag set.
Method Summary
SearchCtrl__init__(self, parent, id, value, pos, size, style, validator, name)
A search control is a composite of a wx.TextCtrl with optionalbitmap buttons and a drop-down menu.
boolCreate(self, parent, id, pos, size, style, validator, name)
Do the 2nd phase and create the GUI control.
StringGetDescriptiveText(self)
Get the text to be displayed when the user has not yet typed anythingin the control.
MenuGetMenu(self)
Returns a pointer to the search control's menu object or None if thereis no menu attached.
boolIsCancelButtonVisible(self)
Indicates whether the cancel button is visible.
boolIsSearchButtonVisible(self)
Returns the search button visibility value.
SetCancelBitmap(self, bitmap)
Sets the bitmap to use for the cancel button.
SetDescriptiveText(self, text)
Set the text to be displayed when the user has not yet typed anythingin the control.
SetMenu(self, menu)
Sets the search control's menu object.
SetSearchBitmap(self, bitmap)
Sets the bitmap to use for the search button.
SetSearchMenuBitmap(self, bitmap)
Sets the bitmap to use for the search button when there is a drop-downmenu associated with the search control.
ShowCancelButton(self, show)
Shows or hides the cancel button.
ShowSearchButton(self, show)
Sets the search button visibility value on the search control.

Property Summary
CancelButtonVisible
DescriptiveText
Menu
SearchButtonVisible
thisown: The membership flag

Instance Method Details

__init__(self, parent, id=-1, value=wxEmptyString, pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=SearchCtrlNameStr)
(Constructor)

A search control is a composite of a wx.TextCtrl with optionalbitmap buttons and a drop-down menu. Controls like this can typicallybe found on a toolbar of applications that support some form of searchfunctionality. On the Mac this control is implemented using thenative HISearchField control, on the other platforms a generic controlis used, although that may change in the future as more platformsintroduce native search widgets.

If you wish to use a drop-down menu with your wx.SearchCtrl then youwill need to manage its content and handle the menu events yourself,but this is an easy thing to do. Simply build the menu, pass it toSetMenu, and also bind a handler for a range of EVT_MENU events.This gives you the flexibility to use the drop-down menu however youwish, such as for a history of searches, or as a way to selectdifferent kinds of searches. The ToolBar.py sample in the demo showsone way to do this.

Since the control derives from wx.TextCtrl it is convenient to usethe styles and events designed for wx.TextCtrl. For example you canuse the wx.TE_PROCESS_ENTER style and catch thewx.EVT_TEXT_ENTER event to know when the user has pressed theEnter key in the control and wishes to start a search.

EVT_SEARCHCTRL_SEARCH_BTNSent when the search icon is clicked
EVT_SEARCHCTRL_CANCEL_BTNSent when the cancel icon is clicked
EVT_TEXTSent when the text changes
EVT_TEXT_ENTERSent when the RETURN/ENTER key is pressedin the search control and the control hasthe wx.TE_PROCESS_ENTER style flag set.
Parameters:
parent
(type=Window)
id
(type=int)
value
(type=String)
pos
(type=Point)
size
(type=Size)
style
(type=long)
validator
(type=Validator)
name
(type=String)
Returns:
SearchCtrl
Overrides:
wx.TextCtrl.__init__

Create(self, parent, id=-1, value=wxEmptyString, pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name=SearchCtrlNameStr)

Do the 2nd phase and create the GUI control.

Parameters:
parent
(type=Window)
id
(type=int)
pos
(type=Point)
size
(type=Size)
style
(type=long)
validator
(type=Validator)
name
(type=String)
Returns:
bool
Overrides:
wx.TextCtrl.Create(inherited documentation)

GetDescriptiveText(self)

Get the text to be displayed when the user has not yet typed anythingin the control.

Returns:
String

GetMenu(self)

Returns a pointer to the search control's menu object or None if thereis no menu attached.

Returns:
Menu

IsCancelButtonVisible(self)

Indicates whether the cancel button is visible.

Returns:
bool

IsSearchButtonVisible(self)

Returns the search button visibility value. If there is a menuattached, the search button will be visible regardless of the searchbutton visibility value. This always returns false in Mac OS X v10.3

Returns:
bool

SetCancelBitmap(self, bitmap)

Sets the bitmap to use for the cancel button. This currently does notwork on the Mac.

Parameters:
bitmap
(type=Bitmap)

SetDescriptiveText(self, text)

Set the text to be displayed when the user has not yet typed anythingin the control.

Download Mp3 Free, There are 20 song lists that you can download. Telugu Nonstop Mashup DJ Dinna Remix Tollywood Mashup Telugu DJ Songs 2020 DJ Dinna mariamachowska Mp3 Database 35:48. Telugu dj mix songs free download 2013. Free 2020 All Telugu Mashupfolk Dj Songs New Folk Mp3 Songs Download 320 Kbps (Telugu DJ Mashup Songs 2020 Latest Folk Songs Folk DJ Songs Lalitha Audios And Videos) Mix Hindiaz. Telugu DJ Remix Songs, Telugu DJ club mix Abba Nee Tiyyani Mix By Balu Dj.mp3 (3.91 MB) Abbani Tiyyani Tabal Mix By. Telugu DJ Remix Songs Download - Collection 4 Panchadhara Bhomma Magadheera Remix By Dj Chakradhar Chakri.mp3 (3.38 MB) Panjaa Ela Ela Re Mix By Dj. Download Telugu Dj Songs Download MP3 Free. Telugu Dj Songs Download mp3 download lagu gratis (32.78MB) in HD Quality 320kbps. Lagu Telugu Dj Songs Download music video song available on www.pertamusic.com.

Parameters:
text
(type=String)

SetMenu(self, menu)

Sets the search control's menu object. If there is already a menuassociated with the search control it is deleted.

Parameters:
menu
(type=Menu)

SetSearchBitmap(self, bitmap)

Sets the bitmap to use for the search button. This currently does notwork on the Mac.

Parameters:
bitmap
(type=Bitmap)

SetSearchMenuBitmap(self, bitmap)

Sets the bitmap to use for the search button when there is a drop-downmenu associated with the search control. This currently does not workon the Mac.

Parameters:
bitmap
(type=Bitmap)

ShowCancelButton(self, show)

Shows or hides the cancel button.

Parameters:
show
(type=bool)

ShowSearchButton(self, show)

Sets the search button visibility value on the search control. Ifthere is a menu attached, the search button will be visible regardlessof the search button visibility value. This has no effect in Mac OS Xv10.3

Parameters:
show
(type=bool)

Property Details

CancelButtonVisible

Get Method:
IsCancelButtonVisible(self)
Set Method:
ShowCancelButton(self, show)
Wxpython window events

DescriptiveText

Get Method:
GetDescriptiveText(self)
Set Method:
SetDescriptiveText(self, text)

Menu

Get Method:
GetMenu(self)
Set Method:
SetMenu(self, menu)

SearchButtonVisible

Get Method:
IsSearchButtonVisible(self)
Set Method:
ShowSearchButton(self, show)

thisown

The membership flag

Wxpython autocomplete
HomeTreesIndexHelp
Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:14:15 2007http://epydoc.sf.net

Popular Posts