Print Page | Close Window

MarkupObjects Tag Property as Variant

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: MarkupLabel Control
Forum Description: Topics Related to Codejock MarkupLabel Control
URL: http://forum.codejock.com/forum_posts.asp?TID=16419
Printed Date: 29 April 2024 at 1:48am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: MarkupObjects Tag Property as Variant
Posted By: jpbro
Subject: MarkupObjects Tag Property as Variant
Date Posted: 06 March 2010 at 4:42pm
Many times I would like to associate ActiveX controls, classes, etc... with MarkupObjects. The easiest way to do this would be to assign them to the Tag property of the MarkupObject, but this tag only accepts other MarkupObject objects (not generic VB objects).

It would be very helpful if the MarkupObject.Tag property was a Variant data type that could handle everything a Variant type normally does in VB6.



-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6




Replies:
Posted By: Krog
Date Posted: 08 October 2011 at 4:29am
Hi!

In the version 15.1.3 there is the Tag property, with a Variant data type. This is useful.

But... It is not working for me.

When I set a integer value to the Tag property it does not store it, it returns Null.

In the immediate pane:

FieldItem.Tag=123
?FieldItem.Tag
Null

The FieldItem is declared as a MarkupTextBlock object.



-------------
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows XP SP2
Language: Visual Basic 6 SP6


Posted By: jpbro
Date Posted: 08 October 2011 at 10:20am
Sadly, the Tag property only accepts other Markup objects. I don't think this is likely to change.

Some other possibilities:

You could create a TextBlock with a text value of 123 and store the MarkupTextBlock object in the Tag property.

Or you could keep a separate list of (array or collection) of your tag values.

Or you could use the Name property to store your tag values (if you aren't using name for anything yet).




-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Krog
Date Posted: 08 October 2011 at 7:39pm

This is in the help file:

Description

Gets or sets an arbitrary object value that can be used to store custom information about this element.

Property type

Read-write property

Syntax (Visual Basic)

Public Property Tag() As Variant

Return Type

The intended value. This property has no default value.

Remarks

This is the same as any other Tag property, you can store just about any type of data in this property.




-------------
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows XP SP2
Language: Visual Basic 6 SP6


Posted By: Krog
Date Posted: 12 April 2012 at 12:54am
Some news on this?

-------------
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows XP SP2
Language: Visual Basic 6 SP6



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net