File: wx.lib.platebtn.txt

package info (click to toggle)
wxpython4.0 4.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 211,112 kB
  • sloc: cpp: 888,355; python: 223,130; makefile: 52,087; ansic: 45,780; sh: 3,012; xml: 1,534; perl: 264
file content (106 lines) | stat: -rw-r--r-- 3,820 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc

.. module:: wx.lib.platebtn

.. currentmodule:: wx.lib.platebtn

.. highlight:: python



.. _wx.lib.platebtn:

==========================================================================================================================================
|phoenix_title|  **wx.lib.platebtn**
==========================================================================================================================================

Editra Control Library: PlateButton

The PlateButton is a custom owner drawn flat button, that in many ways emulates
the buttons found the bookmark bar of the Safari browser. It can be used as a
drop in replacement for wx.Button/wx.BitmapButton under most circumstances. It
also offers a wide range of options for customizing its appearance, a
description of each of the main style settings is listed below.

Main Button Styles:
Any combination of the following values may be passed to the constructor's style
keyword parameter.

PB_STYLE_DEFAULT:
Creates a flat label button with rounded corners, the highlight for mouse over
and press states is based off of the hightlight color from the systems current
theme.

PB_STYLE_GRADIENT:
The highlight and press states are drawn with gradient using the current
highlight color.

PB_STYLE_SQUARE:
Instead of the default rounded shape use a rectangular shaped button with
square edges.

PB_STYLE_NOBG:
This style only has an effect on Windows but does not cause harm to use on the
platforms. It should only be used when the control is shown on a panel or other
window that has a non solid color for a background. i.e a gradient or image is
painted on the background of the parent window. If used on a background with
a solid color it may cause the control to loose its transparent appearance.

PB_STYLE_DROPARROW:
Add a drop button arrow to the button that will send a separate event when
clicked on.

Other attributes can be configured after the control has been created. The
settings that are currently available are as follows:

  - SetBitmap: Change/Add the bitmap at any time and the control will resize and
               refresh to display it.
  - SetLabelColor: Explicitly set text colors
  - SetMenu: Set the button to have a popupmenu. When a menu is set a small drop
             arrow will be drawn on the button that can then be clicked to show
             a menu.
  - SetPressColor: Use a custom highlight color


Overridden Methods Inherited from PyControl:

  - SetFont: Changing the font is one way to set the size of the button, by
             default the control will inherit its font from its parent.

  - SetWindowVariant: Setting the window variant will cause the control to
                      resize to the corresponding variant size. However if the
                      button is using a bitmap the bitmap will remain unchanged
                      and only the font will be adjusted.

Requirements:
  - python2.4 or higher
  - wxPython2.8 or higher


|class_summary| Classes Summary
===============================

================================================================================ ================================================================================
:ref:`~wx.lib.platebtn.PlateButton`                                              PlateButton is a custom type of flat button with support for
================================================================================ ================================================================================


|


.. toctree::
   :maxdepth: 1
   :hidden:

   wx.lib.platebtn.PlateButton