Results 1 to 9 of 9

Thread: prob.

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    8

    Angry

    Currently,my prog. has a listbox which displays all the records from db,however right now i need to implement it such that a check box is allocated along with each of the data.How do i do that? Can i use data repeater ?? any ideas ... thanks

    Cheers

    Cariz

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Componets/Windows common Controls 6 I think

    A ListView is one type of control you could use.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840

    Thumbs up


    You're in luck

    Code:
       Listbox1.Style = 1
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  4. #4
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    I could have sworn they had that capicity but I couldn't find the darn thing. [B}Style[/b] and I'm combing the mine fields looking for Check....da da dum dum

    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  5. #5

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    8

    Wink

    hey Joe,thanks for the info. but i'm kinda new to listview...do you happened to know any tutorials on this?would appreciate it.tHanks..

    Cheers
    Cariz

  6. #6
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    In case you missed it Paul has noted that the listbox itself has the checkbox capabilites under style. I'll see if I have anything on listview.I know I can't have much I've only use the control on a few occassions.

    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  7. #7
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Code:
    I found this..it might be right along the lines you are 
    looking for. If you can't find anything on listviews here
    then just go to my web page / links and there are 5 or 6 very good VB sites listed...Code Archive comes to mind as 
    having very good zip files on controls.
    
    Wayne
    
    
    Option Explicit
    
    ' Populate a listview with checkboxes
    ' using a field from a database as caption
    
    
    Private Sub Form_Load()
    
    ListView1.Checkboxes = True
    
        Dim l As Long
        Dim dblRnd As Double
        Dim dteRnd As Date
        With ListView1
    'this is your header
            .ColumnHeaders.Add(, , "String").Tag = "File Listing"
    ' Set the column alignment
            .ColumnHeaders(1).Alignment = lvwColumnLeft
        End With
    
            '
    ' Set BorderStyle property.
       ListView1.BorderStyle = ccFixedSingle
    '
    ' Set View property to Report.
       ListView1.View = lvwReport
    '
    Dim Index As Long
    
    Dim sql
    sql = "select * from tips"
    Data1.RecordSource = sql
    Data1.Refresh
    
    ' Populate the list with data
         
                While Not Data1.Recordset.EOF
                     With ListView1.ListItems.Add(, , Index & " " & Data1.Recordset!sListing)
                      Index = Index + 1
                        End With
                         
            Data1.Recordset.movenext
    
                Wend
      
    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  8. #8

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    8

    Talking hee

    thanks to you both anyways...maybe i'd log off and try on your codes.

  9. #9

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    8

    Question

    Hey guys i was just thinking of using dataRepeater to display info from db but i wanna know if info can be updated to the db.Another qn is,if i were to use listview...it is possible to add multiple checkboxes to specified columns that are under the same list item.How do i do that..?i looked thro the internet for its functions but they seem to not facilate that feature.

    tHAnks ~
    Cariz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width