Might as well get editable comboboxes overwith.
This commit is contained in:
parent
5e4e01ef52
commit
27260d6b0b
|
@ -28,8 +28,9 @@ SETTOO(Spinbox, High, 80)
|
|||
SETTOO(Slider, Low, -80)
|
||||
SETTOO(Slider, High, 80)
|
||||
|
||||
uiCombobox *cbox;
|
||||
uiRadioButtons *rb;
|
||||
static uiCombobox *cbox;
|
||||
static uiCombobox *editable;
|
||||
static uiRadioButtons *rb;
|
||||
|
||||
uiBox *makePage4(void)
|
||||
{
|
||||
|
@ -84,6 +85,12 @@ uiBox *makePage4(void)
|
|||
uiComboboxAppend(cbox, "Item 3");
|
||||
uiBoxAppend(page4, uiControl(cbox), 0);
|
||||
|
||||
editable = uiNewEditableCombobox();
|
||||
uiComboboxAppend(editable, "Editable Item 1");
|
||||
uiComboboxAppend(editable, "Editable Item 2");
|
||||
uiComboboxAppend(editable, "Editable Item 3");
|
||||
uiBoxAppend(page4, uiControl(editable), 0);
|
||||
|
||||
rb = uiNewRadioButtons();
|
||||
uiRadioButtonsAppend(rb, "Item 1");
|
||||
uiRadioButtonsAppend(rb, "Item 2");
|
||||
|
|
|
@ -174,6 +174,7 @@ interface Combobox from Control {
|
|||
func Append(text *const char);
|
||||
};
|
||||
func NewCombobox(void) *Combobox;
|
||||
func NewEditableCombobox(void) *Combobox;
|
||||
|
||||
interface RadioButtons from Control {
|
||||
func Append(text *const char);
|
||||
|
|
|
@ -38,7 +38,7 @@ static void comboboxAppend(uiCombobox *cc, const char *text)
|
|||
uiFree(wtext);
|
||||
}
|
||||
|
||||
uiCombobox *uiNewCombobox(void)
|
||||
static uiCombobox *finishNewCombobox(DWORD style)
|
||||
{
|
||||
struct combobox *c;
|
||||
uiWindowsMakeControlParams p;
|
||||
|
@ -49,7 +49,7 @@ uiCombobox *uiNewCombobox(void)
|
|||
p.dwExStyle = WS_EX_CLIENTEDGE;
|
||||
p.lpClassName = L"combobox";
|
||||
p.lpWindowName = L"";
|
||||
p.dwStyle = CBS_DROPDOWNLIST | WS_TABSTOP;
|
||||
p.dwStyle = style | WS_TABSTOP;
|
||||
p.hInstance = hInstance;
|
||||
p.lpParam = NULL;
|
||||
p.useStandardControlFont = TRUE;
|
||||
|
@ -65,3 +65,13 @@ uiCombobox *uiNewCombobox(void)
|
|||
|
||||
return uiCombobox(c);
|
||||
}
|
||||
|
||||
uiCombobox *uiNewCombobox(void)
|
||||
{
|
||||
return finishNewCombobox(CBS_DROPDOWNLIST);
|
||||
}
|
||||
|
||||
uiCombobox *uiNewEditableCombobox(void)
|
||||
{
|
||||
return finishNewCombobox(CBS_DROPDOWN);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue