home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 8,859 of 10,840   
   Maarten to Randy Birch   
   Re: checkbox in listbox?   
   07 Oct 04 14:35:27   
   
   From: gurkjaan@hotmail.com   
      
   Debug.Print   
      
   ive seen this command being used a couple of times.   
   what is this command for?   
      
   thankyou Maarten   
      
   "Randy Birch"  wrote in message   
   news:COadnRGb0ZXvO_ncRVn-gw@rogers.com...   
   > Private Sub Form_Load()   
   >   
   >    Dim cnt As Long   
   >   
   >    For cnt = 1 To 10   
   >       List1.AddItem "Item " & cnt   
   >    Next   
   >   
   >    Command1.Caption = "Get selected items"   
   >    Command2.Caption = "Clear selection"   
   >   
   > End Sub   
   >   
   > Private Sub Command1_Click()   
   >   
   >    Dim cnt As Long   
   >   
   >    With List1   
   >   
   >       If .SelCount > 0 Then   
   >          For cnt = 0 To .ListCount - 1   
   >             If .Selected(cnt) = True Then   
   >                Debug.Print .List(cnt)   
   >             End If   
   >          Next   
   >       End If   
   >   
   >    End With   
   >   
   > End Sub   
   >   
   >   
   > Private Sub Command2_Click()   
   >   
   >    Dim cnt As Long   
   >   
   >    With List1   
   >   
   >       If .SelCount > 0 Then   
   >   
   >          For cnt = 0 To .ListCount - 1   
   >             .Selected(cnt) = False   
   >          Next   
   >   
   >       End If   
   >   
   >    End With   
   >   
   >   
   > End Sub   
   >   
   >   
   >   
   > --   
   >   
   >   
   > Randy Birch   
   > MS MVP Visual Basic   
   > http://vbnet.mvps.org/   
   >   
   >   
   > "Maarten"  wrote in message   
   > news:41649739$0$861$ba620e4c@news.skynet.be...   
   > : thank you for yourre quick reply,   
   > : i did so (set the style property to checked)   
   > : and it looks nice   
   > :   
   > : but do you mightbe have a litle example code how to work with te box in   
   > the   
   > : list?   
   > :   
   > : Kind regards Maarten   
   > :   
   > :   
   > : "Maarten"  wrote in message   
   > : news:416491c8$0$848$ba620e4c@news.skynet.be...   
   > : > hi all   
   > : >   
   > : > i was wondering if it is posible to add checkboxe in a listbox   
   > : > and if so how do i do it?   
   > : >   
   > : > thankyou   
   > : >   
   > : > Maarten   
   > : >   
   > : >   
   > :   
   > :   
   >   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca