Giter Site home page Giter Site logo

Comments (4)

nmgwddj avatar nmgwddj commented on July 16, 2024

@shuilan0066 你应该把 HBox 更换为 ButtonBox。

from nim_duilib_framework.

nmgwddj avatar nmgwddj commented on July 16, 2024

或者你可以把 Control 的 mouse 属性设置为 false,因为你点击界面中间的时候,Control 控件拦截了鼠标点击消息。
如果你希望点击 HBox 任何一个位置都响应你写的 Event,应该把 Option、Control 的 mouse 属性都设置为 false,让他们不要抢占点击事件。

上面说的 ButtonBox 的做法是自由布局属性的,所以可能跟你的场景不太符合。

from nim_duilib_framework.

nmgwddj avatar nmgwddj commented on July 16, 2024

或者你可以把 Control 的 mouse 属性设置为 false,因为你点击界面中间的时候,Control 控件拦截了鼠标点击消息。
如果你希望点击 HBox 任何一个位置都响应你写的 Event,应该把 Option、Control 的 mouse 属性都设置为 false,让他们不要抢占点击事件。

上面说的 ButtonBox 的做法是自由布局属性的,所以可能跟你的场景不太符合。

from nim_duilib_framework.

shuilan0066 avatar shuilan0066 commented on July 16, 2024

@nmgwddj 嗯 可行 将子控件 mouse都设置为false后, 实现了这种效果 响应了点击事件

from nim_duilib_framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.