Results 1 to 4 of 4

Thread: Tabstrip

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343

    Question

    I'm battling to assign caption to a tab in my tabstrip in runtime!!

    What I do is get 2 dates and then calculate the no of days between the 2 dates - now I go into a loop (no of days times) and for each day add a tab to my tabstrip - I now also want to assign caption to the tab - any help please!!

    Here is my code.... I am trying to name each tab to the corresponding day!!

    Private Sub Form_Load()
    'thru a previous procedure I already know how many days there are

    Dim intTabs As Integer
    While intNoOfDays > intTabs
    TabStrip1.Tabs.Add
    intTabs = intTabs + 1
    'This line does not work to add the caption!!
    TabStrip1.Tabs.Item.Caption = intTabs
    Wend

    End Sub

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Try the CStr() statement.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343

    Wink

    Parksie - how about another clue???

    I'm sorry but I dont know what you mean!!

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    How about this:
    Code:
    TabStrip1.Tabs(intTabs).Caption = CStr(intTabs)
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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