作成日: 2018/08/08 最終更新日: 2018/11/29
文書種別
不具合
状況
修正済み
詳細
C1MultiSelectコントロールにおいて、リストの項目数が多く、ドロップダウンリストを表示した際にその領域の一部がフォームの下端をはみ出すような高さになった場合、はみ出した部分がクリッピングされてしまうため、表示されません。
回避方法
この問題は2018J v3(4.0.20183.338)で修正されました。
※修正版を適用しない場合の回避方法は以下の通りです。
本現象を直接回避することはできません。次善の方法として、フォームのサイズに合わせてドロップダウンの高さを調整する方法をご検討ください。
◎サンプルコード(VB)
◎サンプルコード(C#)
※修正版を適用しない場合の回避方法は以下の通りです。
本現象を直接回避することはできません。次善の方法として、フォームのサイズに合わせてドロップダウンの高さを調整する方法をご検討ください。
◎サンプルコード(VB)
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim dt As DataTable = New DataTable
dt.Columns.Add("ID", GetType(System.Int32))
dt.Columns.Add("Items", GetType(System.String))
dt.Rows.Add(1, "Apple")
dt.Rows.Add(2, "Orange")
dt.Rows.Add(3, "Grape")
dt.Rows.Add(4, "Banana")
dt.Rows.Add(5, "Strawberry")
dt.Rows.Add(6, "Pineapple")
'dt.Rows.Add(7, "Scrollbar does not show although display text are exceeded Display Area!!!")
dt.Rows.Add(7, "Lemon")
C1MultiSelect1.BindingInfo.DataSource = dt
C1MultiSelect1.BindingInfo.DataMember = "Items"
C1MultiSelect1.BindingInfo.DisplayMemberPath = "Items"
C1MultiSelect1.TagWrap = True
UpdateDropDownSize()
End Sub
Private Sub Form1_Resize(sender As Object, e As EventArgs) Handles MyBase.Resize
UpdateDropDownSize()
End Sub
Private Sub UpdateDropDownSize()
Dim top As Integer = (C1MultiSelect1.Top + C1MultiSelect1.Height)
Dim height As Integer = (Me.ClientSize.Height - top)
C1MultiSelect1.DropDownHeight = height
End Sub
Dim dt As DataTable = New DataTable
dt.Columns.Add("ID", GetType(System.Int32))
dt.Columns.Add("Items", GetType(System.String))
dt.Rows.Add(1, "Apple")
dt.Rows.Add(2, "Orange")
dt.Rows.Add(3, "Grape")
dt.Rows.Add(4, "Banana")
dt.Rows.Add(5, "Strawberry")
dt.Rows.Add(6, "Pineapple")
'dt.Rows.Add(7, "Scrollbar does not show although display text are exceeded Display Area!!!")
dt.Rows.Add(7, "Lemon")
C1MultiSelect1.BindingInfo.DataSource = dt
C1MultiSelect1.BindingInfo.DataMember = "Items"
C1MultiSelect1.BindingInfo.DisplayMemberPath = "Items"
C1MultiSelect1.TagWrap = True
UpdateDropDownSize()
End Sub
Private Sub Form1_Resize(sender As Object, e As EventArgs) Handles MyBase.Resize
UpdateDropDownSize()
End Sub
Private Sub UpdateDropDownSize()
Dim top As Integer = (C1MultiSelect1.Top + C1MultiSelect1.Height)
Dim height As Integer = (Me.ClientSize.Height - top)
C1MultiSelect1.DropDownHeight = height
End Sub
◎サンプルコード(C#)
private void Form1_Load(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt.Columns.Add("ID", typeof(int));
dt.Columns.Add("Items", typeof(string));
dt.Rows.Add(1, "Apple");
dt.Rows.Add(2, "Orange");
dt.Rows.Add(3, "Grape");
dt.Rows.Add(4, "Banana");
dt.Rows.Add(5, "Strawberry");
dt.Rows.Add(6, "Pineapple");
dt.Rows.Add(7, "Scrollbar does not show although display text are exceeded Display Area!!!");
c1MultiSelect1.BindingInfo.DataSource = dt;
c1MultiSelect1.BindingInfo.DataMember = "Items";
c1MultiSelect1.BindingInfo.DisplayMemberPath = "Items";
c1MultiSelect1.TagWrap = true;
UpdateDropDownSize();
}
private void Form1_Resize(object sender, EventArgs e)
{
UpdateDropDownSize();
}
private void UpdateDropDownSize()
{
int top = c1MultiSelect1.Top + c1MultiSelect1.Height;
int height = this.ClientSize.Height - top;
c1MultiSelect1.DropDownHeight = height;
}
{
DataTable dt = new DataTable();
dt.Columns.Add("ID", typeof(int));
dt.Columns.Add("Items", typeof(string));
dt.Rows.Add(1, "Apple");
dt.Rows.Add(2, "Orange");
dt.Rows.Add(3, "Grape");
dt.Rows.Add(4, "Banana");
dt.Rows.Add(5, "Strawberry");
dt.Rows.Add(6, "Pineapple");
dt.Rows.Add(7, "Scrollbar does not show although display text are exceeded Display Area!!!");
c1MultiSelect1.BindingInfo.DataSource = dt;
c1MultiSelect1.BindingInfo.DataMember = "Items";
c1MultiSelect1.BindingInfo.DisplayMemberPath = "Items";
c1MultiSelect1.TagWrap = true;
UpdateDropDownSize();
}
private void Form1_Resize(object sender, EventArgs e)
{
UpdateDropDownSize();
}
private void UpdateDropDownSize()
{
int top = c1MultiSelect1.Top + c1MultiSelect1.Height;
int height = this.ClientSize.Height - top;
c1MultiSelect1.DropDownHeight = height;
}
旧文書番号
83112