Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > MarkupLabel Control
  New Posts New Posts RSS Feed - MarkupObjects Tag Property as Variant
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

MarkupObjects Tag Property as Variant

 Post Reply Post Reply
Author
Message
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Topic: MarkupObjects Tag Property as Variant
    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

Back to Top
Krog View Drop Down
Groupie
Groupie


Joined: 06 February 2008
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote Krog Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
Krog View Drop Down
Groupie
Groupie


Joined: 06 February 2008
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote Krog Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Krog View Drop Down
Groupie
Groupie


Joined: 06 February 2008
Status: Offline
Points: 100
Post Options Post Options   Thanks (0) Thanks(0)   Quote Krog Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.