How to display values in labels

C

cmdolcet69

I need a way to get the .text property of a label however i dont want
to display that property in the label box. I thought i could do
somthing with the visible property however it will not show the label.
I need the label to show however i want the actual text value blank in
that lable.
 
S

ShaneO

cmdolcet69 said:
I need a way to get the .text property of a label however i dont want
to display that property in the label box. I thought i could do
somthing with the visible property however it will not show the label.
I need the label to show however i want the actual text value blank in
that lable.
Use '.Tag'

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
 
C

cmdolcet69

Use '.Tag'

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.

How would the .tag work with this ?

CType(newGraphics.readingLabelArrayList(intloop), Label).text


I thought i could have just said
CType(newGraphics.readingLabelArrayList(intloop), Label).visible=false
however that takes away the whole testbox.
 
Z

zacks

How would the .tag work with this ?

CType(newGraphics.readingLabelArrayList(intloop), Label).text

I thought i could have just said
CType(newGraphics.readingLabelArrayList(intloop), Label).visible=false
however that takes away the whole testbox.

What do you want to see? If a Label is visible, all you will see is
the contents of the Text property. It sounds like you want to
associate a value with the label but do not display it even when the
label is visible. The best way to do that is to store this value in
the Tag property instead of the Text property, which is why the Tag
property was even suggested.
 
C

cmdolcet69

What do you want to see? If a Label is visible, all you will see is
the contents of the Text property. It sounds like you want to
associate a value with the label but do not display it even when the
label is visible. The best way to do that is to store this value in
the Tag property instead of the Text property, which is why the Tag
property was even suggested.- Hide quoted text -

- Show quoted text -

Well all i did was change the text color property to the value color
property and it seems to work, harsh i know but i don;t know too much
about the tag property. maybe ill use it next time or look at some
examples. Thanks anyways for all the help
 
Z

zacks

Well all i did was change the text color property to the value color
property and it seems to work, harsh i know but i don;t know too much
about the tag property. maybe ill use it next time or look at some
examples. Thanks anyways for all the help

I have used the Tag property extensively. All it is is a property that
you can use to associate some data with the control. In VB6 days, it
was a String, but in .NET it is an object, so it can contain virtually
anything you want to put in it.
 
S

ShaneO

cmdolcet69 said:
Well all i did was change the text color property to the value color
property and it seems to work, harsh i know but i don;t know too much
about the tag property. maybe ill use it next time or look at some
examples. Thanks anyways for all the help

The way it read to me was that you wanted to place some type of
"Invisible" text into the Label or at least associate (and store) some
type of data in the Label Control without it showing in the actual Text
of the Label Control(???)

If this is true, then my suggestion is not only valid, but arguably the
BEST way to do it, afterall, that's what the TAG Property is there for!

If this is not true, then please explain yourself more thoroughly so
people might be able to provide the help you require.


ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top