Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

VB6 problem

Options
  • 27-07-2006 11:12am
    #1
    Closed Accounts Posts: 24


    I'm writing a small program in VB6

    I have a number of text boxes on the main form and I use the Tag property to display a name beside eack text box. I require different text boxes to appear and disappear during the running of the program so I use textboxname.visible = false etc when I want this to happen. The problem is that the Tag associated with each text box doesn't disappear with the text box so my form is left with the tags when the text boxes are gone.

    Anyone have any ideas how to make the textbox Tag dissapear with the text box?

    Thanks.


Comments

  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    Can you post some code? IIRC the tag shouldn't be appearing at all. The Textbox.Tag property is there to hold extra information regarding the control should the developer require it. That is unless you're using a 3rd party control.


  • Closed Accounts Posts: 6,151 ✭✭✭Thomas_S_Hunterson


    Generally, i use the label control to display the information beside the control personally.


  • Closed Accounts Posts: 24 holmsey


    the tag names aren't entered using any code, when i have the form open in VB6 i click on the text box then go to properties and enter the name i want to appear beside the text box in the Tag property


  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    holmsey wrote:
    the tag names aren't entered using any code,
    As EP said...the Tag property is simply a "placeholder" to store additional information against a control should you wish to. Visual Basic does nothing with Tag values.

    So if you're entering something into .Tag and its appearing beside the textbox on the form, the someone's code is doing the work somewhere. It is not a built-in feature of VB6.
    when i have the form open in VB6 i click on the text box then go to properties and enter the name i want to appear beside the text box in the Tag property

    Phil wasn't talking about how you populate that property. He was saying that nothing is done with a populated Tag property, except by 3rd-party code.

    Someone's code somewhere is displaying the values. This code, wherever it is, is non-standard VB stuff, and without seeing the code its impossible to tell you why you're getting your bug.

    jc


  • Closed Accounts Posts: 24 holmsey


    Yeah I'm adding to someone else's code alright and its causing me plenty of problems cos it's all fairly new to me, I wouldn't even know where to start looking for the code that's obviously written for those Tags.

    Not to worry I just thought I was missing something obvious that like 'Tag = false' that would have sorted it out. I'll just leave the things as they are, it wont look as good but it'll work.

    Cheers folks


  • Advertisement
  • Registered Users Posts: 15,443 ✭✭✭✭bonkey


    holmsey wrote:
    I wouldn't even know where to start looking for the code that's obviously written for those Tags.

    Without trying to be smart.....start by searching the code for ".Tag" and look for anything that is *reading* the value, rather than *writing* to it.


Advertisement