|
| | CenteredStaticText (wxWindow *parent, wxWindowID id, const wxString &label, const wxPoint &position, const wxSize &size=wxDefaultSize, long style=0) |
| void | CenterOnPosition (const wxPoint &position) |
◆ CenteredStaticText()
| CenteredStaticText::CenteredStaticText |
( |
wxWindow * | parent, |
|
|
wxWindowID | id, |
|
|
const wxString & | label, |
|
|
const wxPoint & | position, |
|
|
const wxSize & | size = wxDefaultSize, |
|
|
long | style = 0 ) |
|
inline |
57 }
class WXDLLIMPEXP_FWD_CORE wxStaticText
Definition ProgressDialog.hpp:30
#define style
Definition WipeTowerDialog.cpp:101
void CenterOnPosition(const wxPoint &position)
Definition StepMeshDialog.cpp:59
References CenterOnPosition(), and style.
◆ CenterOnPosition()
| void CenteredStaticText::CenterOnPosition |
( |
const wxPoint & | position | ) |
|
|
inline |
59 {
60 int textWidth, textHeight;
61 GetTextExtent(GetLabel(), &textWidth, &textHeight);
62 int x = position.x - textWidth / 2;
63 int y = position.y - textHeight / 2;
64 SetPosition(wxPoint(x, y));
65 }
Referenced by CenteredStaticText().
The documentation for this class was generated from the following file: