Contents Up Previous Next

wxButtonBar: wxToolBar

Overview

A wxButtonBar very similar to the wxToolBar, but is optimized for use under MS Windows, giving a more attractive appearance and better feedback. Include the file wx_bbar.h to use this class.

See the comments in documentation for wxToolBar for functions such as CreateTools that have are harmless when called for wxToolBar but have specific meaning for wxButtonBar under Windows 95. CreateTools must be called under Windows for wxButtonBar.

Note: under Windows 95, a wxButtonBar cannot be moved to any position other than the top-left of the frame. If this is a problem, you may wish to alter wx_bbar.h and wx_bbar.cpp to compile the non-Windows 95 code instead.

wxButtonBar::wxButtonBar
wxButtonBar::GetDefaultButtonHeight
wxButtonBar::GetDefaultButtonWidth
wxButtonBar::SetDefaultSize


wxButtonBar::wxButtonBar

void wxButtonBar(wxWindow *parent, int x = 0, int y = 0,
int width = -1, int height = -1, long style = 0,
int orientation = wxVERTICAL, int nRowsOrColumns = 1, char *name = "buttonBar")

Constructs a buttonbar panel (canvas under XView).

parent is a parent window, usually a wxFrame.

x, y set the position of the window.

width, height set the size of the window.

style is a bitlist, with no buttonbar specific flags at present.

orientation specifies a wxVERTICAL or wxHORIZONTAL orientation for laying out the buttonbar. Must always be wxVERTICAL under Windows 95.

nRowsOrColumns specifies the number of rows or columns, whose meaning depends on orientation. If laid out vertically, nRowsOrColumns specifies the number of rows to draw before the next column is started; if horizontal, it refers to the number of columns to draw before the next row is started. Under Windows 95, this value refers to the number of rows only.

name specifies a window name for the buttonbar.


wxButtonBar::GetDefaultButtonHeight

float GetDefaultButtonHeight(void)

Returns the real height of the button (bitmap height plus the extra for 3D effects).


wxButtonBar::GetDefaultButtonWidth

float GetDefaultButtonWidth(void)

Returns the real width of the button (bitmap width plus the extra for 3D effects).


wxButtonBar::SetDefaultSize

void SetDefaultSize(float width, float height)

Sets the default size of the button bitmap. The default is 16x15 pixels.