Results 1 to 7 of 7

Thread: Using the Tag property

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2006
    Location
    MI
    Posts
    2,012

    Using the Tag property

    Does anybody use the Tag property of controls & forms? If so, what for?

  2. #2
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Re: Using the Tag property

    Tags are used for tooltips mainly
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Using the Tag property

    @Megalith - They are? That's news to me. I've always used a ToolTip control for that... which them gives all of my controls a ToolTip property.

    @nbrege - different things. I've used them to hold binding information. I've used them to hold IDs for objects, that's part of the beauty of the Tag property, they're sort of a kitchen sink property, use it for what ever you need to. At least with .NET the Tahg property became an Object type. Previously they were typed as string, which made them somewhat limited.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2006
    Location
    MI
    Posts
    2,012

    Re: Using the Tag property

    tg - OK, I was just wondering what its originally intended purpose was & if I was mis-using it. I use it for various things too like storing "hidden" data, passing data to others forms, etc., but don't know if those are proper uses or not.

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

    Re: Using the Tag property

    Quote Originally Posted by Megalith View Post
    Tags are used for tooltips mainly
    Ummm... no
    Quote Originally Posted by nbrege View Post
    tg - OK, I was just wondering what its originally intended purpose was & if I was mis-using it. I use it for various things too like storing "hidden" data, passing data to others forms, etc., but don't know if those are proper uses or not.
    That's basically what it's used for, since the Tag property is an Object, you can store controls in it too, which I've used occasionally.
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

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

  6. #6
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Re: Using the Tag property

    lol i think they were in VB6 but was first thing on the top of my head
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

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

    Re: Using the Tag property

    Quote Originally Posted by Megalith View Post
    lol i think they were in VB6 but was first thing on the top of my head
    vb1 through 4 maybe, but even then not in vb5 or 6 tooltips where handled by their own control back then too.
    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