add checkbox and radiobox demo to periodic table
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
65f16f3144
commit
2369b96091
6 changed files with 55 additions and 14 deletions
|
|
@ -145,8 +145,8 @@ static void MWAPI menu_handler(MwWidget handle, void* user, void* call) {
|
|||
}
|
||||
|
||||
int main() {
|
||||
int i;
|
||||
MwWidget f, w;
|
||||
int i, j;
|
||||
MwWidget f, w, b;
|
||||
int index;
|
||||
MwMenu m, m2;
|
||||
void* v;
|
||||
|
|
@ -224,6 +224,30 @@ int main() {
|
|||
MwNratio, Columns - 2,
|
||||
NULL));
|
||||
|
||||
for(i = 0; i < 2; i++) {
|
||||
f = frame(i == 0 ? "CheckBox" : "RadioBox", -PaddingContent, -PaddingContent, MwBoxClass,
|
||||
MwNmargin, PaddingContent,
|
||||
NULL);
|
||||
w = child(f);
|
||||
b = MwVaCreateWidget(MwBoxClass, "box1", w, 0, 0, 0, 0,
|
||||
MwNorientation, MwVERTICAL,
|
||||
MwNfixedSize, 16,
|
||||
NULL);
|
||||
for(j = 0; j < 5; j++) MwCreateWidget(i == 0 ? MwCheckBoxClass : MwRadioBoxClass, i == 0 ? "cb" : "rb", b, 0, 0, 0, 0);
|
||||
b = MwVaCreateWidget(MwBoxClass, "box1", w, 0, 0, 0, 0,
|
||||
MwNorientation, MwVERTICAL,
|
||||
NULL);
|
||||
for(j = 0; j < 5; j++) {
|
||||
char buf[32];
|
||||
sprintf(buf, "%sBox %d", i == 0 ? "Check" : "Radio", j + 1);
|
||||
MwVaCreateWidget(MwLabelClass, "label", b, 0, 0, 0, 0,
|
||||
MwNtext, buf,
|
||||
MwNalignment, MwALIGNMENT_BEGINNING,
|
||||
NULL);
|
||||
}
|
||||
add(f);
|
||||
}
|
||||
|
||||
f = frame("ComboBox", -PaddingContent, 24, MwComboBoxClass, NULL);
|
||||
w = child(f);
|
||||
MwComboBoxAdd(w, -1, "Hello!");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue