NIM_Duilib_Framework icon indicating copy to clipboard operation
NIM_Duilib_Framework copied to clipboard

HListBox 滚动条显示问题

Open shuilan0066 opened this issue 5 years ago • 4 comments

` <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时, 滚动条就不可见了

不知是什么原因

shuilan0066 avatar Feb 11 '20 13:02 shuilan0066

能否做一个能简单重现问题的示例上传到你的个人仓库中,这样我们也方便帮你分析问题。

nmgwddj avatar Feb 13 '20 01:02 nmgwddj

HListBox的滚动条刷新不正常,滚动到右侧的时候后可能会出现截断或者不自动隐藏等问题。

fevear2101 avatar May 20 '20 02:05 fevear2101

HListBox对WM_TOUCH只支持VScrollBar有效的情况,只有HScrollBar的时候无法使用触摸拖动。

fevear2101 avatar May 20 '20 07:05 fevear2101

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; } 发现这里有问题

fevear2101 avatar Jul 10 '20 05:07 fevear2101