Segmented Control missing HelpTag

Is there any (cross-platform) method of adding individual help tags to the segments of a segmented control? It seems like this would be a basic feature.

OK, so after searching Feedback and finding a comment from Geoff, I’ve answered my own question. The trick is to add help tags to the individual segments “programmatically” in the “Open” event.

  Dim seg As SegmentedControlItem
  seg = Me.Items(0)
  seg.HelpTag = "Help Tag 1"
  seg = Me.Items(1)
  seg.HelpTag = "Help Tag 2"
  seg = Me.Items(2)
  seg.HelpTag = "Help Tag 3"

Now, this begs the question, why doesn’t the compiler allow me to simplify the code like so:

Me.Items(0).HelpTag = "Help Tag 1"
Me.Items(1).HelpTag = "Help Tag 2"
Me.Items(2).HelpTag = "Help Tag 2"

It seems as if this basic feature should be added as another column in the “Edit Segments” dialog in the IDE, no?

Well, technically you get a _SegmentedControlItemProxy object (As you see in compiler error message) when you try to get items as whole object. And this has Operator_Subscript for the array access.

So it’s simply not an array of SegmentedControlItem. No idea why they implemented it this way.

This works.

SegmentedControlItem(SegmentedControlInstance.Items(0)).HelpTag = "New Help Tag"

Would make a nice Dash snippet.

As far as simplifying, you can. In 2014r1 I put a segmentedcontrol in a new window. In the event I have:

SegmentedControl1.Items(0).helptag = "Blah"
SegmentedControl1.Items(1).helptag = "Bleap."

No compiler error (although the helptag doesn’t autocomplete), and it runs fine under OSX and Win7.

Bill, right you are. No autocomplete here either, but it works as you would expect. I probably didn’t bother even trying that since autocomplete didn’t give a hint that it was possible. Thanks!

Still would be nice if the ability to specify help tags for individual items was added to the IDE (like you can specify icons). I’ll check Feedback and add as a feature request if it’s not there already.


Autocomplete works if you cast it as I did.