Dialog tutorial:
Part
2
This page of the tutorial develops
the Search Dialog, by adding boxes for case-sensitive and
up/down searches. We will
layout the case-sensitive checkbox, and two radiobuttons (for
up/down) horizontally using sizers
Return to the Dialog Editor panel
by clicking 
- Right click the control labelled
CreateButtonSizer, choose Insert and add a wxBoxSizer (name it
subsizer if you like)
- Double click where its label is
wxVERTICAL and type wxHORIZONTAL
- Right click subsizer and choose
Insert | wxCheckbox. This checkbox could be named
CaseSensitiveCheckBox - expand its + and give it a label (eg Case -
sensitive)
- To hold the radiobuttons, we will
use a static box sizer, and give it a label of Search
direction instead of Static box label
- Add two radiobuttons to
m_StaticBoxSizer, making sure they have different names (eg
radiobuttonup). Set their labels in the dialog edtor to Up and
down
- Right click the dialog editor and
choose Goto Include. Modify the include file as
follows:
-
- If you prefer the inital setting
to be case-sensitive searches, replace state with TRUE [otherwise
FALSE ]
- For the radiobuttonup, replace
value with FALSE
- For the radiobuttondown, replace
value with TRUE
- Optional extra: add a Match exact
words check box
Any problems?
- If you get a GPF fault
when running, use Make | Clean and then
Make | make as changing a header (eg adding a control) does't
always make windows - based compilers recompile all the files
properly
Next
Back
wxHatch
Home 