Results 1 to 24 of 24

Thread: Tabless Tab Control

  1. #1

    Thread Starter
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Tabless Tab Control

    Did you ever came across situations where you wanted to develop interfaces like in below images.





    In some of my projects I wanted to develop UI like the images displayed below, in some projects I needed a wizard interface where in I just wanted to hide tab headings and display the appropriate tabs when needed.

    When I thought about such interface, the first control that came in mind was obviously Tab Control that comes with .NET by default. But there no property to hide tab headings in Tab Control. After some digging I managed to remove the tab headings but the result was not up to my expectations. So I started to find out alternatives and came across this website.

    Author Mick Doherty has posted a custom control which helped me to design the interface that I imagined. He call the control as PanelManager.



    It works somewhat like Tab Control but doesn't has tab headings. When you drop PanelManager on the form in design mode then it contains two panels by default. Once the PanelManager is dropped on the form you can design the UI just like we do in Tab control. You can then change the current panel through SelectedPanel property from property browser. To change the selected panel from coding use SelectedIndex property.

    Code of the PanelManager control is too long to post it here so I am uploading it as a file. Please find PanelManager.vb in attached files. Note that you'll need to add a reference to System.Design.dll. Once you compile the control it becomes available in Toolbox.
    Attached Images Attached Images    
    Attached Files Attached Files

  2. #2
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: Tabless Tab Control

    Very nice control, it was the basis for my Wizard interface.

    I have been toying around with it some more to create interfaces such as the examples you posted (in a single usercontrol) but haven't managed it properly so far. I do have a codebank submission here that basically creates the firefox settings window for you, but it uses a 'dirty workaround' which uses a Tabcontrol during Design time.

  3. #3

    Thread Starter
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Re: Tabless Tab Control

    Quote Originally Posted by NickThissen
    I have been toying around with it some more to create interfaces such as the examples you posted (in a single usercontrol) but haven't managed it properly so far.
    Hey.. thanks to appreciate but you have not told me the problem you are having to design the screen like mine.

  4. #4
    Banned
    Join Date
    Feb 2009
    Location
    https://t.me/pump_upp
    Posts
    1

    Re: Tabless Tab Control

    Hi. a blind programming student, and will paste some array exercises that i need help finding. and suing arrays, structures. tried looking on the net, but could not seem to find any thing. so would like your help where i could find sample vb dot net 2005 vb programs. so will paste the project descriptions below. contact me via e-mail off list. cheers Marvin. {Email Removed}. 8.1 Array of a structure. Create a project to analyze an income survey. The
    statistics for each home include an identification code, the number of
    members in the household, the yearly income, and the state of residence.
    A menu will contain File, Reports, and Help. The File menu will contain
    Enter Data and Exit. As the data are entered, they should be assigned from
    the text boxes to the elements of a structure.
    The reports for the project will be sent to the printer and include the
    following:
    (a) A four-column report displaying the input data.
    (b) A listing of the identification number and income for each household
    that exceeds the average income.
    (c) The percentage of households having incomes below the poverty level.

    Test Data
    Poverty Guidelines for 2004:

    Family Size 48 Contiguous States Alaska Hawaii

    1 9310 11630 10700

    2 12490 15610 14360

    3 15670 19590 18020

    4 18850 23570 21680

    5 22030 27550 25340

    6 25210 35510 32660

    7 28390 35510 32660

    8 31570 39490 36320

    For each additional 3180 3980 3660
    person add
    bra6215X_ch08.qxd 3/24/05 8:13 AM Page 348



    348 V I S U A L B A S I C Arrays



    ID Number Number of Persons Annual Income Residence

    2497 2 32500 Nevada

    3323 5 23000 Illinois

    4521 4 38210 Arizona

    6789 2 38000 Maine

    5476 1 26000 North
    Dakota

    4423 3 16400 California

    6587 4 25000 Alaska

    3221 4 20500 Hawaii

    5555 2 18000 Alaska

    0085 3 19700 Hawaii

    3097 8 30000 Washington

    4480 5 23400 Florida

    0265 2 19700 Texas

    8901 3 13000 Michigan



    Section Price

    Orchestra 40.00

    Mezzanine 27.50

    General 15.00

    Balcony 10.00

    8.2 Two-dimensional table. Modify Programming Exercise 8.1 to assign the
    data to a multidimensional array rather than use an array of a structure.
    8.3 Create a project to keep track of concert ticket sales by your club. Ticket
    prices are based on the seating location. Your program should calculate
    the price for each sale, accumulate the total number of tickets sold in
    each section, display the ticket price schedule, and print a summary of all
    sales.
    The form should contain a list box of the sections for seating.
    Do not allow the user to receive an exception for subscript out-of-
    range.
    bra6215X_ch08.qxd 3/24/05 8:13 AM Page 349



    C H A P T E R 8 349


    8.4 Array of a structure. Create a project that will allow a user to look up state
    names and their two-letter abbreviations. The user will have the options to
    Look up the Abbreviation or Look up the State Name. In the event that a match
    cannot be found for the input, display an appropriate error message.
    Use radio buttons with a shared event procedure and a Select Case
    to determine which text box (state name or abbreviation) should have the
    focus and which should be set to ReadOnly.
    Data

    AL Alabama
    MT Montana

    AK Alaska

    NE Nebraska

    AS American Samoa

    NV Nevada

    AZ Arizona

    NH New Hampshire
    AR Arkansas

    NJ New Jersey

    CA California

    NM New Mexico

    CO Colorado

    NY New York

    CT Connecticut NC North Carolina

    DE Delaware
    ND North Dakota

    DC District of Columbia
    OH Ohio

    FL Florida OK Oklahoma

    GA Georgia
    OR Oregon

    GU Guam

    PA Pennsylvania

    HI Hawaii PR Puerto Rico

    ID Idaho RI Rhode Island

    IL Illinois SC South Carolina

    IN Indiana SD South Dakota

    IA Iowa TN Tennessee

    KS Kansas TX Texas

    KY Kentucky
    TT Trust Territories
    LA Louisiana UT Utah
    ME Maine
    VT Vermont

    MD Maryland

    VA Virginia

    MA Massachusetts

    VI Virgin Islands

    MI Michigan WA Washington

    MN Minnesota
    WV West Virginia

    MS Mississippi

    WI Wisconsin

    MO Missouri

    WY Wyoming
    bra6215X_ch08.qxd 3/24/05 8:13 AM Page 350



    350 V I S U A L B A S I C Arrays


    8.5 Two-dimensional table. Create a project that looks up the driving distance
    between two cities. Use two drop-down lists that contain the names of the
    cities. Label one list “Departure” and the other “Destination”. Use a Look
    Up button to calculate the distance.
    Store the distances in a two-dimensional table.



    8.6 Two-dimensional table. Create a project in which the user will complete a
    10-question survey. Create a form containing labels with each of the
    questions and a group of radio buttons for each question with the follow-
    ing responses: Always, Usually, Sometimes, Seldom, and Never.
    Use a two-dimensional array to accumulate the number of each re-
    sponse for each question.
    Have a menu or button option that will print an item analysis on the
    printer that shows the question number and the count for each response.
    Sample of partial output:

    Las Los New Washington
    Boston Chicago Dallas Vegas Angeles Miami Orleans Toronto Vancouver DC
    Boston 0 1004 1753 2752 3017 1520 1507 609 3155 448
    Chicago 1004 0 921 1780 2048 1397 919 515 2176 709
    Dallas 1753 921 0 1230 1399 1343 517 1435 2234 1307
    Las Vegas 2752 1780 1230 0 272 2570 1732 2251 1322 2420
    Los Angeles 3017 2048 1399 272 0 2716 1858 2523 1278 2646
    Miami 1520 1397 1343 2570 2716 0 860 1494 3447 1057
    New Orleans 1507 919 517 1732 1858 860 0 1307 2734 1099
    Toronto 609 515 1435 2251 2523 1494 1307 0 2820 571
    Vancouver 3155 2176 2234 1322 1278 3447 2734 2820 0 2887
    Washington DC 448 709 1307 2420 2646 1057 1099 571 2887 0



    Question Always Usually Sometimes Seldom Never



    1 5 2 10 4 6

    2 2 2 10 2 1

    3 17 0 10 0 0
    bra6215X_ch08.qxd 3/24/05 8:13 AM Page 351



    C H A P T E R 8 351



    Create a project that will calculate shipping charges
    from a two-dimensional table of rates. The rate de-
    pends on the weight of the package and the zone to
    which it will be shipped. The Weight column specifies
    the maximum weight for that rate. All weights over 10
    pounds use the last row.

    Case Studies

    VB Mail Order

    Zone

    Weight A B C D

    1 1.00 1.50 1.65 1.85

    3 1.58 2.00 2.40 3.05

    5 1.71 2.52 3.10 4.00

    10 2.04 3.12 4.00 5.01

    >10 2.52 3.75 5.10 7.25



    VB Auto Center

    VB Auto sells its own brand of spark plugs. To cross-
    reference to major brands, it keeps a table of equiva-
    lent part numbers. VB Auto wants to computerize the
    process of looking up part numbers in order to im-
    prove its customer service.
    The user should be able to enter the part number
    and brand and look up the corresponding VB Auto
    part number. You may allow the user to select the
    brand (Brand A, Brand C, or Brand X) from a list or
    from radio buttons.
    You can choose from two approaches for the look-
    up table. Store the part numbers either in a two-
    dimensional table or in an array of a structure. In either
    case, use the part number and brand entered by the
    user; look up and display the VB Auto part number.
    VB Auto Brand A Brand C Brand X

    PR214 MR43T RBL8 14K22

    PR223 R43 RJ6 14K24

    PR224 R43N RN4 14K30

    PR246 R46N RN8 14K32

    PR247 R46TS RBL17Y 14K33

    PR248 R46TX RBL12-6 14K35

    PR324 S46 J11 14K38

    PR326 SR46E XEJ8 14K40

    PR444 47L H12 14K44
    bra6215X_ch08.qxd 4/8/05 12:32 PM Page 352



    352 V I S U A L B A S I C Arrays


    Video Bonanza

    Create a project that displays the aisle number of a
    movie category in a label. The movie categories will be
    in a list box. Store the aisle numbers and categories in
    an array.
    A Search button should locate the correct location
    from the array and display it in a label. Make sure that
    the user has selected a category from the list and use
    the list box SelectedIndex property to find the appro-
    priate aisle number.
    Table Data

    Aisle 1 Comedy

    Aisle 2 Drama

    Aisle 3 Action

    Aisle 4 Sci-Fi

    Aisle 5 Horror

    Back Wall New Releases



    Very Very Boards

    Modify your project from Chapter 6 to keep track of
    each order in an array. You can then print out the en-
    tire order with detail lines for each type of shirt. Con-
    vert the event handling for the radio buttons to share
    an event procedure. Use a Case structure for selec-
    tion.
    Create an array of a structure, which holds the
    quantity, size, monogram (Boolean), pocket (Boolean),
    price, and extended price for each type of shirt or-
    dered. As each shirt type is added to an order, store
    the information in the array. Add a menu option to
    print out the order, which will have the customer name
    and order number at the top, and one line for each
    shirt type ordered. Use the following layout as a rough
    guide for your list. Make sure to align the numeric
    columns correctly. For the two Boolean fields (Mono-
    gram and Pocket), print Yes or No. Do not allow the
    user to print an invoice until the order is complete.


    Very Very Boards Shirt Orders
    By Your Name


    Customer name: xxxxxxxxxxxxxxxxxxxxxx

    Order Number: xxxxx

    Quantity Size Monogram Pocket Price Extended
    Each Price

    ==================================================

    xxx xxx xxx xxx xx x,xxx

    Order Total: xx,xxx

  5. #5

  6. #6
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Re: Tabless Tab Control

    Got any idea on how to achieve the looks of that 2nd image?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  7. #7

  8. #8

    Thread Starter
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Re: Tabless Tab Control

    This is the output of my work of 30 minutes. Yes, it's not exactly similar but see if it helps you. I have attached the application. I have used LineShape Control from VB PowePacks.

    Attached Images Attached Images  
    Attached Files Attached Files

  9. #9
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Re: Tabless Tab Control

    Thanks, will try to expand on that one. Anyone here who happen to know the name of that control? I am trying to search if there are already custom controls out there that mimics that but I am at lost of the keyword.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  10. #10
    Hyperactive Member Cyb3rH4Xter's Avatar
    Join Date
    May 2009
    Location
    Sweden
    Posts
    449

    Re: Tabless Tab Control

    How do i fix this tabless control? I have added a reference to System.Design, what to do now?

  11. #11

    Thread Starter
    PowerPoster Deepak Sakpal's Avatar
    Join Date
    Mar 2002
    Location
    Mumbai, India
    Posts
    2,424

    Re: Tabless Tab Control

    Quote Originally Posted by Cyb3rH4Xter View Post
    How do i fix this tabless control? I have added a reference to System.Design, what to do now?
    Press CRTL+SHIFT+B to build the control. Once the control is compiled, it becomes available in Toolbox at the top for use.

  12. #12
    New Member
    Join Date
    Jul 2009
    Posts
    5

    Re: Tabless Tab Control

    I am having trouble seeing this Panel Manager Component pop-up in the Toolbox even after I "Press CRTL+SHIFT+B". Do I need to compile it in a new control project or can I simply add the class to an existing project?

  13. #13

  14. #14
    New Member
    Join Date
    Jul 2009
    Posts
    5

    Re: Tabless Tab Control

    Sorry, I am somewhat of a newbie with this IDE but this would be the perfect solution to what I have in mind. I have tried to use panels and it is an awful mess when you have 20 to 30 panels to manage in the same client area.

    Unfortunately, yes, I got several warnings and the class did not show up in the Toolbox.

    Warning 1 'Public Overrides Sub OnSetComponentDefaults()' is obsolete: 'This method has been deprecated. Use InitializeNewComponent instead. http://go.microsoft.com/fwlink/?linkid=14202'. C:\Documents and Settings\tnickelsen\My Documents\Development\PDCC\TreeView Plan Test\TreeView Plan Test\PanelManager.vb 394 13 Plan Browser

    Warning 2 Unable to apply publish properties for item "microsoft.office.tools.common.v9.0". Plan Browser
    Warning 3 Unable to apply publish properties for item "microsoft.office.tools.v9.0". Plan Browser

    Warning 4 Unable to apply publish properties for item "microsoft.visualstudio.tools.applications.hosting.v9.0". Plan Browser

    Warning 5 Unable to apply publish properties for item "microsoft.visualstudio.tools.applications.runtime.v9.0". Plan Browser

    Warning 6 Unable to apply publish properties for item "microsoft.visualstudio.tools.applications.serverdocument.v9.0". Plan Browser

  15. #15
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: Tabless Tab Control

    There's a difference between warnings and errors. An error is critical; your code cannot compile with errors. You can compile your code with warnings, but you are usually advised to fix them first. Warnings should not stop the project from compiling. After you Build, does it say Build succeeded in the lower left corner of the IDE?

    How did you add the class to your project?

    The first warning is merely due to the fact that the code uses an old method that got a newer version in an update. It shouldn't matter too much I think, and in this case I'm sure it is not the cause of your problem; I've used the exact same code succesfully. If you do want to fix the warning, all you need to do is find the 'OnSetComponentsDefault' method, and rename it to 'InitializeNewComponent'.

    The other warnings seem unrelated. Do you get them without this control too?

  16. #16
    New Member
    Join Date
    Jul 2009
    Posts
    5

    Re: Tabless Tab Control

    Wow!

    I fixed the warnings and voila, the Panel Manager works!

    This is great. Thanks so much for all your hard work.

  17. #17
    New Member
    Join Date
    Jul 2009
    Posts
    5

    Re: Tabless Tab Control

    There are some problems with the way that child controls are displayed on the designer. For example, when you put a button control on the lower right of a managed panel and anchor it: Bottom Right, then run the app and resize it, the button repositions as expected. However, when you stop the app and go back to the designer, the button disappears from the managed panel. You can find the button in the Properties listbox and after some maneuvering, move it back in position, but this is a real hassle and not the way I would expect a control to work. In a regular panel, the button would maintain its position in the designer regardless of the positioning during runtime with this type of anchor.
    Last edited by tlnickelsen; Aug 6th, 2009 at 09:22 PM.

  18. #18
    New Member
    Join Date
    Feb 2010
    Posts
    2

    Re: Tabless Tab Control

    It seems that the initial calculations for placement using anchors is done before the managed panel has been sized. I've found the following solution. Add the this to ManagedPanel class:

    Code:
    protected override void OnLayout(LayoutEventArgs levent)
    {
      if (Parent!=null) base.OnLayout(levent);
    }

  19. #19
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: Tabless Tab Control

    Quote Originally Posted by jensrodi View Post
    It seems that the initial calculations for placement using anchors is done before the managed panel has been sized. I've found the following solution. Add the this to ManagedPanel class:

    Code:
    protected override void OnLayout(LayoutEventArgs levent)
    {
      if (Parent!=null) base.OnLayout(levent);
    }
    ..... and converted to vb.net since that what language this codebank thread is in:
    Code:
    Protected Overrides Sub OnLayout(ByVal e As LayoutEventArgs)
        If Parent IsNot Nothing Then MyBase.OnLayout(e)
    End Sub
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  20. #20
    New Member
    Join Date
    Feb 2010
    Posts
    2

    Re: Tabless Tab Control

    Sorry about that. I have no experience in VB, only C# and just tried to help others with the same problem.

  21. #21
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: Tabless Tab Control

    Quote Originally Posted by jensrodi View Post
    Sorry about that. I have no experience in VB, only C# and just tried to help others with the same problem.
    That's not a problem, there's a lot of people here fluent in both languages, however I figured since the thread is in the vb codebank, then it should be converted to vb for those who don't know both languages. So I converted it.
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  22. #22
    Fanatic Member
    Join Date
    Dec 2009
    Posts
    547

    Re: Tabless Tab Control

    2 questions

    how do you add a reference?

    How do you add controls to each individual tab like you would do normnally so they toggle with what is selected

  23. #23
    Fanatic Member
    Join Date
    Jun 2001
    Location
    Oregon
    Posts
    643

    Re: Tabless Tab Control

    2 years later...

    I found this in the code bank, and if its what i think it is, i NEEEEED this! I have a form with 15 panels on it, and i have to keep them shrunk and moved out of the way of eachother.. Its a horrible situation, but this could do it! Here's my problem; Project > Add Reference > .NET tab > No System.Design.dll is there? Just for s.... and giggles, i checked the other tabs and its not there.. Searched my comp and found the file here:
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Design.dll along with an xml file of the same name...

    Any ideas what to do? Once I add the vb file to my project, i have 28 errors and 1 warning... I'm using VB2010

  24. #24
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: Tabless Tab Control

    Quote Originally Posted by kayleigh View Post
    2 questions

    how do you add a reference?

    How do you add controls to each individual tab like you would do normnally so they toggle with what is selected
    Go to the project's properties (in solution explorer right click the project name and select properties), then on the reference tab on the left & click the Add, it's on the .Net tab. If you're using VS2010 and targetting the 4.0 FW, it will not show until you change the target FW from the 4.0 Client Profile to the full 4.0 FW. To do that click the Compile tab and click the 'Advanced Compile Options' button, change the FW and VS will prompt to re-load the project. Then add the System.Design reference as described above.

    Quote Originally Posted by PMad View Post
    2 years later...

    I found this in the code bank, and if its what i think it is, i NEEEEED this! I have a form with 15 panels on it, and i have to keep them shrunk and moved out of the way of eachother.. Its a horrible situation, but this could do it! Here's my problem; Project > Add Reference > .NET tab > No System.Design.dll is there? Just for s.... and giggles, i checked the other tabs and its not there.. Searched my comp and found the file here:
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Design.dll along with an xml file of the same name...

    Any ideas what to do? Once I add the vb file to my project, i have 28 errors and 1 warning... I'm using VB2010
    On the compile tab of the project's properties click the 'Advanced Compile Options' button, change the Target FW from "4.0 Client Profile" to just "Framework 4", after VS has reloaded the project go to the References tab and add System.Design


    I don't know why MS didn't include System.Design in the Client Profile FW, but I've noticed that even if I target the full blown 4.0 FW and I reference the System.Design dll only from it, my app still runs on computers that only have the 4.0 Client Profile installed, so most of the time you wont actually require end users to install the full FW, the client profile will be fine. But be sure to test your apps on a machine that only has the client profile installed first!
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

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