Dotnetbar幻灯片 - 调整大小问题 [英] Dotnetbar Slide Panel - Resizing Problem

查看:105
本文介绍了Dotnetbar幻灯片 - 调整大小问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我在visual studio 2010中使用dotnetbar。



我添加了dotnetbar滑动面板形成。单击按钮时,面板滑入,按下取消按钮时,面板滑出。但是,当窗体最大化或重新调整大小时,滑动面板不会改变它的大小。滑动面板锚定模式是左+右+顶部+底部(在填充停靠模式下我不需要它。)



此外,如果我们运行表单并最大化滑动面板可见时的形状,然后锁定它的锚点并最大化。如果我们在滑动面板不可见的情况下最大化形状,它就无法检测到形状大小而不能锚定。



请帮助我.... />


uboy

Hi All,

I am using dotnetbar with visual studio 2010.

I added dotnetbar slide panel to form. When a button is clicked, the panel slides-in & when cancel button pressed, the panel slides out. But, when the form is maximized or re-sized, the slide panel not change it's size. Slide panel anchor mode is left+right+top+bottom (I don't need it in filled dock mode).

Also, if we run the form & maximize the form while the slide panel is visible, then it locks to it's anchor points & maximizes. If we maximize the form while the slide panel invisible, it can't detect the form size & not anchoring.

Please help me on this....

uboy

推荐答案

问候。

我有同样的问题。

实现解决如下。

首先,你必须计算表格矩形和幻灯片之间的差异,就像你必须考虑对象的原始位置x,y一样。

之后在表单的resize事件中添加以下内容





Greetings.
I had that same question.
Achieve solve follows.
First you must calculate the difference between the rectangle of the form and the slidepanel like you have to consider the original location x,y of the object.
After this in the resize event of the form add the following


If Not SlidePanel1.IsOpen Then
    SlidePanel1.OpenBounds = New System.Drawing.Rectangle(OriginalX, OriginalY, Me.DisplayRectangle.Width - DifferenceWidth, Me.DisplayRectangle.Height - DifferenceHeight)
End If





OriginalX OriginalY DifferenceWidth DifferenceHeight 是必须的变量和常量手动声明或设置。

对不起,英语不是我的母语使用翻译来回答



来自委内瑞拉的问候



OriginalX,OriginalY,DifferenceWidth and DifferenceHeight are variables and constants which you must declare or set manually.
Sorry, English is not my native language using a translator to answer

Greetings from Venezuela


这篇关于Dotnetbar幻灯片 - 调整大小问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆