Bug fixed.
The PopupList control was destroying all other ownerdrawn controls placed on the same window! Doh!

Download
===============================================
Hi,
I was in need of a simple (and easy to implement!


Hence, a whopping great cheat was in order!
Still, minimal testing aside, it seems to work okay.
Here's a quick demo Windows exe which you can try :
http://www.purecoder.net/PopupList.exe
(Simply run it and right-click anywhere in the Window etc.)
Methods exposed by the PopupList class :
Code: Select all
AddItem(position, text.s)
ClearItems()
Destroy()
GetColor.l(colorType)
GetFont.l()
GetHeight.l()
GetItem.s(position)
GetItemCount.l()
GetState.l()
GetWidth.l()
GetX.l()
GetY.l()
RemoveItem(position)
Resize(x, y, width, height)
SetColor(colorType, color)
SetFont(font)
Show.l(state=-1)
- There is no help manual / user guide. Instead, look at the residents file for a few comments on each method where appropriate. Most methods are completely and utterly self explanatory.
- This can easily be extended to allow for icons etc.
- Embedding other controls within this control is quite feasible. It would be quite a bit of work though and it is not something which I require just yet, so I will leave this for another day.
- I haven't done much testing!