Adding icons to menus in VB.NET
-
Retana Padilla has wrote a fine tool. But... (Excuse me, but my Englisch is not so good...) I 'll try to use this code... And make it better and better... So I have set the EvMeasureItem.ItemHeight = 20 That is just enough to sign a rectangle round a icon (16*16) of 2 pixels width... For instance I want tot use it in the header... Then it goes wrong... The second item in the header comes over the first item... When I go over the first Item with the cursor than you can't see the Icon in the second item in the header... I think that the code have problems with: The sub MeasureItems... I don't understand very good how it's works. Especially... EvMeasureItem.ItemWidth = CInt(EvMeasureItem.Graphics.MeasureString (GetRealText(Mi), m_Font, 10000, sf).Width) + 10 (I have make it like this... EvMeasureItem.ItemWidth = CInt(EvMeasureItem.Graphics.MeasureString (GetRealText(Mi), m_Font, 10000, sf).Width) + 30 It is better but not good enough... And... Also with the function GetRealText... Can it be that sometimes the code don't got the real length in pixels?... Another question is... Is it also possible to manipulate the Item ----------------- I hope that someone can help me ... Vriendelijke groeten Gilbert