Results 1 to 8 of 8

Thread: wierd tabcontrol behavior

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2004
    Posts
    34

    wierd tabcontrol behavior

    I have a Tabcontrol in a smart device project and it seems when porting the exe to the pocket pc that the tabs are changed in order.

    In my collection i have order: Adm, Ins, Dek, Sch, Kam and Ldg

    when starting the program i get order: Adm, Ins, Kam, Ldg, Dek and Sch

    There is NO code that handles the order of tabs or whatever.

    It's driving me mad !


    thx


    6f6

  2. #2
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    This is a known issue with VS NET.
    The only solid workaround (that I heard of anyway) is to remove all the tabs and add them again thru code on form load or something.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2004
    Posts
    34

    tab

    ok, but does this main i have to add all controls of the tabpages too using code ??


    Are you saying I have to create the forms at run-time ?

  4. #4
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    No. Only the tabpages.

    Something like this:
    VB Code:
    1. Private Sub Form1_Load.....
    2. TabControl1.TabPages.Clear()
    3. TabControl1.TabPages.Add(TabPage1)
    4. TabControl1.TabPages.Add(TabPage2)
    5. TabControl1.TabPages.Add(TabPage3)
    6. .
    7. .
    8. .
    9. End Sub

    Then the tabs will be placed correctly, and you can still use the designer to make your tabpages. Just disregard the order while designing.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2004
    Posts
    34
    If HisAnswerHelped=True Then
    Msgbox ("Thank You !")
    End If

  6. #6

    Thread Starter
    Member
    Join Date
    Jul 2004
    Posts
    34

    THX

    it's works great !!!

    but the text on the TAB is gone, how do I set the text of each Tab ?

  7. #7
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    That's strange.

    I don't understand why that is cleared. Mine is just fine.
    Maybe it has something to do with Smart Devices. I'm just testing a regular Windows Forms Application.

    Anyway, there should be a property called Text on the tabpage that you can set.

    TabPage1.Text="WhatEver"
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  8. #8
    Lively Member milkmood's Avatar
    Join Date
    Mar 2005
    Location
    Forests of Delta Halo
    Posts
    109

    Re: wierd tabcontrol behavior

    I just did this, and FINALLY! A SOLUTION!
    When I say 'jump', don't waste time asking 'how high?'.

    Just a poor, dumb wanna-be programmer.

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