返回列表 上一主題 發帖

UserForm顯示問題

原本 Height 的設定在 ListStyle = fmListStyleOption   之後      
        .ListBox1.ListStyle = fmListStyleOption         
        .ListBox1.MultiSelect = LB_MultiSelect_Lng
        .ListBox1.List = LB_List_AR_Str
......
        .ListBox1.Height = LB_Height_Sng
        .ListBox1.Width = LB_Width_Sng

把他改成 在 ListStyle = fmListStyleOption   之前      
變成
        .ListBox1.Height = LB_Height_Sng
        .ListBox1.Width = LB_Width_Sng

        .ListBox1.ListStyle = fmListStyleOption         
        .ListBox1.MultiSelect = LB_MultiSelect_Lng
        .ListBox1.List = LB_List_AR_Str

然後拿掉 Doevents
是否ok?

TOP

(1)
listbox 會自動縮放 height
Private Sub CommandButton1_Click()
  ListBox1.ListStyle = fmListStylePlain
  ListBox1.ListStyle = fmListStyleOption
End Sub

(2)
listbox 有瑕疵
連按很多次 CommandButton1 後, 你會看到瑕疵
瑕疵出現後, 移動一下 Form
Private Sub CommandButton1_Click()
  h = ListBox1.Height
  ListBox1.ListStyle = fmListStylePlain
  ListBox1.ListStyle = fmListStyleOption
  ListBox1.Height = h
End Sub

TOP

        靜思自在 : 道德是提昇自我的明燈,不該是呵斥別人的鞭子。
返回列表 上一主題