Fixed #46 removed default value from Combo constructor
- Added combo and single line text control sample to `controls` project. - Modified RichEdit.md to remove duplicate attributes. Signed-off-by: jiajia_deng <2894220@gmail.com>
This commit is contained in:
parent
532f3b2d83
commit
8b74e47c86
@ -43,14 +43,22 @@
|
|||||||
</TreeView>
|
</TreeView>
|
||||||
</HBox>
|
</HBox>
|
||||||
<Control class="splitline_hor_level1"/>
|
<Control class="splitline_hor_level1"/>
|
||||||
<!-- Progress -->
|
<HBox height="85">
|
||||||
<HBox margin="0,10" height="30">
|
<VBox margin="0,0,10">
|
||||||
<Control width="auto" height="auto" bkimage="../public/animation/ani_loading.gif" valign="center"/>
|
<Combo class="list" name="combo" height="30" margin="0,12,0,0" padding="6" bkimage="file='../public/combo/normal.png' corner='5,5,30,5'"/>
|
||||||
<Progress class="progress_blue" name="progress" value="0" margin="10"/>
|
<RichEdit class="simple input" height="30" margin="0,3" padding="6,6,6" promptmode="true" prompttext="Single line text control" promptcolor="lightcolor"/>
|
||||||
</HBox>
|
</VBox>
|
||||||
<HBox margin="0,0,0,10" height="30">
|
<!-- Progress -->
|
||||||
<Control width="auto" height="auto" bkimage="set_speaker.png" valign="center"/>
|
<VBox>
|
||||||
<Slider class="slider_green" value="70" margin="10"/>
|
<HBox margin="0,10" height="32">
|
||||||
|
<Control width="auto" height="auto" bkimage="../public/animation/ani_loading.gif" valign="center"/>
|
||||||
|
<Progress class="progress_blue" name="progress" value="0" margin="10"/>
|
||||||
|
</HBox>
|
||||||
|
<HBox margin="0,0,0,10" height="32">
|
||||||
|
<Control width="auto" height="auto" bkimage="set_speaker.png" valign="center"/>
|
||||||
|
<Slider class="slider_green" value="70" margin="10"/>
|
||||||
|
</HBox>
|
||||||
|
</VBox>
|
||||||
</HBox>
|
</HBox>
|
||||||
<Control class="splitline_hor_level1"/>
|
<Control class="splitline_hor_level1"/>
|
||||||
<!-- RichEdit -->
|
<!-- RichEdit -->
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
| number | false | BOOL | 是否只允许输入数字,如(false) |
|
| number | false | BOOL | 是否只允许输入数字,如(false) |
|
||||||
| align | left | STRING | 文字对齐方式,取值left、right、hcenter、top、vcenter、bottom,如(right) |
|
| align | left | STRING | 文字对齐方式,取值left、right、hcenter、top、vcenter、bottom,如(right) |
|
||||||
| font | -1 | INT | 字体id,如(0) |
|
| font | -1 | INT | 字体id,如(0) |
|
||||||
| promptmode | false | BOOL | 是否显示提示文字,如(true) |
|
|
||||||
| vscrollbar | false | BOOL | 是否使用竖向滚动条,如(true) |
|
| vscrollbar | false | BOOL | 是否使用竖向滚动条,如(true) |
|
||||||
| autovscroll | false | BOOL | 是否随输入竖向滚动,如(true) |
|
| autovscroll | false | BOOL | 是否随输入竖向滚动,如(true) |
|
||||||
| hscrollbar | false | BOOL | 是否使用横向滚动条,如(true) |
|
| hscrollbar | false | BOOL | 是否使用横向滚动条,如(true) |
|
||||||
|
@ -70,6 +70,19 @@ void ControlForm::InitWindow()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Initialize ComboBox data */
|
||||||
|
ui::Combo* combo = dynamic_cast<ui::Combo*>(FindControl(L"combo"));
|
||||||
|
for (auto i = 0; i < 10; i++)
|
||||||
|
{
|
||||||
|
ui::ListContainerElement* element = new ui::ListContainerElement;
|
||||||
|
element->SetClass(L"listitem");
|
||||||
|
element->SetFixedHeight(30);
|
||||||
|
element->SetBkColor(L"white");
|
||||||
|
element->SetTextPadding({ 6,0,6,0 });
|
||||||
|
element->SetText(nbase::StringPrintf(L"Combo element %d", i));
|
||||||
|
combo->Add(element);
|
||||||
|
}
|
||||||
|
|
||||||
/* Load xml file content in global misc thread, and post update RichEdit task to UI thread */
|
/* Load xml file content in global misc thread, and post update RichEdit task to UI thread */
|
||||||
StdClosure closure = [this]() {
|
StdClosure closure = [this]() {
|
||||||
std::streamoff length = 0;
|
std::streamoff length = 0;
|
||||||
|
@ -144,8 +144,6 @@ Combo::Combo() :
|
|||||||
// the items back to the righfull owner/manager when the window closes.
|
// the items back to the righfull owner/manager when the window closes.
|
||||||
m_pLayout.reset(new ListBox(new VLayout));
|
m_pLayout.reset(new ListBox(new VLayout));
|
||||||
m_pLayout->GetLayout()->SetPadding(UiRect(1, 1, 1, 1));
|
m_pLayout->GetLayout()->SetPadding(UiRect(1, 1, 1, 1));
|
||||||
m_pLayout->SetBkColor(L"bk_wnd_lightcolor");
|
|
||||||
m_pLayout->SetBorderColor(L"combobox_border");
|
|
||||||
m_pLayout->SetBorderSize(UiRect(1, 1, 1, 1));
|
m_pLayout->SetBorderSize(UiRect(1, 1, 1, 1));
|
||||||
m_pLayout->SetAutoDestroy(false);
|
m_pLayout->SetAutoDestroy(false);
|
||||||
m_pLayout->EnableScrollBar();
|
m_pLayout->EnableScrollBar();
|
||||||
|
Loading…
Reference in New Issue
Block a user