NIM_Duilib_Framework
NIM_Duilib_Framework copied to clipboard
HListBox 滚动条显示问题
` <HListBox hscrollbar="true" height="auto" childmargin="10">
<HBox hotcolor="bk_menuitem_hovered" width="auto" height="auto" >
<Control bkimage="1.png" width="160" height="90" />
</HBox>
<HBox hotcolor="bk_menuitem_hovered" width="auto" height="auto" >
<Control bkimage="1.png" width="160" height="90" />
</HBox>
<HBox hotcolor="bk_menuitem_hovered" width="auto" height="auto" >
<Control bkimage="1.png" width="160" height="90" />
</HBox>
<HBox hotcolor="bk_menuitem_hovered" width="auto" height="auto" >
<Control bkimage="1.png" width="160" height="90" />
</HBox>
<HBox hotcolor="bk_menuitem_hovered" width="auto" height="auto" >
<Control bkimage="1.png" width="160" height="90" />
</HBox>
<HBox hotcolor="bk_menuitem_hovered" width="auto" height="auto">
<Control bkimage="1.png" width="160" height="90" />
</HBox>
</HListBox>`
如上代码 宽高为160 90 时 滚动条可以显示
但是当把图片宽高 调大 比如 320 180时, 滚动条就不可见了
不知是什么原因
能否做一个能简单重现问题的示例上传到你的个人仓库中,这样我们也方便帮你分析问题。
HListBox的滚动条刷新不正常,滚动到右侧的时候后可能会出现截断或者不自动隐藏等问题。
HListBox对WM_TOUCH只支持VScrollBar有效的情况,只有HScrollBar的时候无法使用触摸拖动。
HListBox的滚动条刷新不正常,滚动到右侧的时候后可能会出现截断或者不自动隐藏等问题。
core/Placeholder.cpp CPoint PlaceHolder::GetScrollOffset() const{ CPoint scrollPos; Control* parent = GetParent(); ScrollableBox* lbParent = dynamic_cast<ScrollableBox*>(parent); if (lbParent && (lbParent->IsVScrollBarValid() || lbParent->IsHScrollBarValid()) && IsFloat()) {//原来的代码这里没有判断仅有水平滚动条的情况 return scrollPos; } 发现这里有问题