The searchentry widget
In Brief
On Mac, this command presents the distinctive round-edged Search Entry widget. On other platforms, it defaults to a standard entry widget.
When using this widget, its options are much the same as for the standard Tile entry widget apart from an extra one controlling the
Mac version's background colour.
Commands
::tclmacbag::searchentry pathName ?Options?
TclMacBag options:
- -background Colour
The colour of the background "outside" the frame. Don't set this option unless you have to. The default makes use of the standard pinstripe pixmap.
In practice, the background setting only really applies to the Mac version of this widget with its curved sides.
- -image Image
A GIF format user image is supported by this widget, however, its dimensions are must be 13x13. Images should aim to use this space fully and not leave a border, as
'white space' is provided for by the widget itself.
It's strongly advised that images be a single dark-coloured greyscale object with a transparent background.
By default, without this option used, this widget will use a built-in version of the magnifying glass image normally associated with searchentry widgets.
Tile entry options:
See: The Tile entry manual.
Further Information
If you need a "metallic" colour, try #b2b2b2 for a dark grey colour instead (and set that as your frame's background colour too).
As is standard, ::tclmacbag::searchentry returns with value of pathName, for ease of use with geometry managers like grid and pack.
This version of the Search Entry widget allows you to have a different background colour for each created widget if you really need it.
For this widget, there is no ::tclmacbag::searchentry_Set command. Modify its properties using $w configure as per the Tile manual.
In the unlikely event you need to change the background colour of the widget once it has been created, use:
style configure $w.Search.entry -background Colour
In the above example, $w refers to the name of your searchentry widget.