调整大小时重新排序 UI 中的按钮
我正在使用 wxWidgets 开发 UI。我正在使用 Visual Studio 2010 C++ Express。
我的 UI 由 7 个垂直网格和 1 个水平网格组成,包围了这 7 个网格。在这 7 个网格中的每一个中,我都有 2 或 3 个位图按钮,这些按钮根据彼此和相邻网格边界相对排序。我将主水平网格设置为面板的大小调整器。
我希望这 7 个网格始终出现在面板的“中间”;这意味着:每次调整尺寸时,都应重新计算它们的坐标,并且按钮应移动到新计算的位置。
是否可以使用 wxWidgets 进行大小调整?我检查了文档和示例,但找不到解决我的问题的简单示例。
谢谢。
I'm developing a UI using wxWidgets. I'm working with Visual Studio 2010 C++ Express.
My UI consists of 7 vertical grids and 1 horizontal grid which envelopes this 7. In each of these 7 grids, I have 2 or 3 bitmap buttons which are relatively ordered according to each other and neighbor grid boundaries. I set the main horizontal grid as sizer to the panel.
I want that these 7 grids always take place in the "middle" of my panel; which means: With every size adjustment, their coordinates should be recalculated and buttons should move to their newly calculated locations.
Is it possible to do this size adjustment with wxWidgets? I checked on the documentation and samples, but I couldn't find a simple example for my problem.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
编写一个调整大小事件处理程序,重新计算按钮的位置并将它们移动到新位置。
Write a resize event handler which recalculates the positions of the buttons and moves them to their new locations.