コンボボックスをズームする時、ドロップダウンの幅が正しく変更されない
対象製品
MultiTouch for Windows Forms 1.0J
状況
修正済み
詳細
コンボボックスのDropDownWidthプロパティにコントロールの幅より大きい値を指定しても、ズームした後ドロップダウンの幅はコントロールと同じになります。
回避方法
この問題はService Pack 3(v1.0.2015.1127)で修正されました。
不具合を修正した最新のサービスパックは、アップデートページ からダウンロードできます。
次のようにドロップダウンの幅に対応したカスタムズームポリシーを適用することで回避できます。
[Visual Basic]
Imports GrapeCity.Win.MultiTouch
Imports System.Windows.Forms
Public Class MyComboBoxZoomPolicy
Inherits ComboBoxZoomPolicy
Public Overrides ReadOnly Property TargetType As System.Type
Get
Return GetType(ComboBox)
End Get
End Property
Public Overrides Sub ZoomBounds(control As System.Windows.Forms.Control, infos As ZoomBoundsInfo)
Dim combo As ComboBox = DirectCast(control, ComboBox)
If Not combo Is Nothing Then
combo.DropDownWidth = infos.Zoom(combo.DropDownWidth)
End If
MyBase.ZoomBounds(control, infos)
End Sub
End Class
[C#]
using System.Windows.Forms;
using GrapeCity.Win.MultiTouch;
public class MyComboBoxZoomPolicy : ComboBoxZoomPolicy
{
public override Type TargetType
{
get { return typeof(ComboBox); }
}
public override void ZoomBounds(Control control, ZoomBoundsInfo infos)
{
ComboBox combo = control as ComboBox;
if (combo != null)
{
combo.DropDownWidth = infos.Zoom(combo.DropDownWidth);
}
base.ZoomBounds(control, infos);
}
}
不具合を修正した最新のサービスパックは、アップデートページ からダウンロードできます。
次のようにドロップダウンの幅に対応したカスタムズームポリシーを適用することで回避できます。
[Visual Basic]
Imports GrapeCity.Win.MultiTouch
Imports System.Windows.Forms
Public Class MyComboBoxZoomPolicy
Inherits ComboBoxZoomPolicy
Public Overrides ReadOnly Property TargetType As System.Type
Get
Return GetType(ComboBox)
End Get
End Property
Public Overrides Sub ZoomBounds(control As System.Windows.Forms.Control, infos As ZoomBoundsInfo)
Dim combo As ComboBox = DirectCast(control, ComboBox)
If Not combo Is Nothing Then
combo.DropDownWidth = infos.Zoom(combo.DropDownWidth)
End If
MyBase.ZoomBounds(control, infos)
End Sub
End Class
[C#]
using System.Windows.Forms;
using GrapeCity.Win.MultiTouch;
public class MyComboBoxZoomPolicy : ComboBoxZoomPolicy
{
public override Type TargetType
{
get { return typeof(ComboBox); }
}
public override void ZoomBounds(Control control, ZoomBoundsInfo infos)
{
ComboBox combo = control as ComboBox;
if (combo != null)
{
combo.DropDownWidth = infos.Zoom(combo.DropDownWidth);
}
base.ZoomBounds(control, infos);
}
}
キーワード
MTTK10001