A little lost: Webpopup menus/Rowtag

Why is there no lastindex property for Popups?

When they are so useful in weblistbox?

WebPopupMenu likely does not have a LastIndex property because PopupMenu never had one. I agree, it would be a useful property in both cases.

feedback://showreport?report_id=25373 is for adding LastIndex to WebPopupMenu.

I voted it up. rank 217. Maybe in 2019 r17…

You have to remember that Listbox.LastIndex was required to be able to do hierarchical listboxes. Since the popup menu is not heirarchical (at least in the same way) the LastIndex doesn’t do anything.

However, what you can do, if you really want to, is use an extends method on WebPopupMenu named LastIndex to get the same value.

Function LastIndex(extends w as WebPopupMenu) As integer return w.listcount-1 End Function

[quote=19213:@Bob Keeney]You have to remember that Listbox.LastIndex was required to be able to do hierarchical listboxes. Since the popup menu is not heirarchical (at least in the same way) the LastIndex doesn’t do anything.

However, what you can do, if you really want to, is use an extends method on WebPopupMenu named LastIndex to get the same value.

Function LastIndex(extends w as WebPopupMenu) As integer return w.listcount-1 End Function [/quote]
I don’t think that will be accurate if you use WebPopupMenu.InsertRow to add a row before the last one.

Yeah, you’re right. I so rarely use InsertRow that I forget that it exists.