AddSubMenu Icon

Hey.
I’m trying on making icons infront of the AddSubMenu. Currently it only works on AddOption()

[lua]
MENU:AddOption(“Clear Buddies”, function() buddies = {} end ):SetImage( “icon16/user_delete.png” )
[/lua]

So AddOption() works fine and icon shows and no errors.

[lua]
local PER_SUBMENU = MENU:AddSubMenu(“Performances”):SetImage( “icon16/transmit_blue.png” )
[/lua]

But when I try the same on AddSubMenu which is basically the same stuff but is a submenu. I get a error that SetImage is nil.
So the question is: How can I make icons at AddSubMenu() ? Or what do I have to edit/do to make it possible?

AddSubMenu returns two values. The first is the submenu, the second is the panel that you would call SetImage.

Alright. Then what to do ?

[lua]
local PER_SUBMENU, PER_SUBMENU_PNL = MENU:AddSubMenu(“Performances”)
PER_SUBMENU_PNL:SetImage( “icon16/transmit_blue.png” )
[/lua]

Ahh! That explains it. Thanks a lot!