Images in ComboBox

Got an idea for enhancing SpiderBasic? New command(s) you'd like to see?
IdeasVacuum
Posts: 143
Joined: Tue Feb 25, 2014 1:27 pm

Images in ComboBox

Post by IdeasVacuum »

Has anyone successfully created a combobox() with 16x16pix images?
No complaints from the compiler, my images are loaded, but not displayed (png).

(Also note that the dropped-down text is reduced quality?)

Code: Select all

Enumeration
#Win
#Combo
#Img000
#Img001
#Img002
#Img003
#Img004
EndEnumeration

LoadImage(#Img000,"http://www.professorcad.co.uk/combo/c000.png")
LoadImage(#Img001,"http://www.professorcad.co.uk/combo/c001.png")
LoadImage(#Img002,"http://www.professorcad.co.uk/combo/c002.png")
LoadImage(#Img003,"http://www.professorcad.co.uk/combo/c003.png")
LoadImage(#Img004,"http://www.professorcad.co.uk/combo/c004.png")

Procedure CloseWindowEvent()
;---------------------------
              CloseWindow(EventWindow())
EndProcedure

If OpenWindow(#Win, 0, 0, 210, 100, "Combo Images", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)

          ComboBoxGadget(#Combo, 5, 5, 200, 20, #PB_ComboBox_Image)

           AddGadgetItem(#Combo, -1, "Image000", ImageID(#Img000))
           AddGadgetItem(#Combo, -1, "Image001", ImageID(#Img001))
           AddGadgetItem(#Combo, -1, "Image002", ImageID(#Img002))
           AddGadgetItem(#Combo, -1, "Image003", ImageID(#Img003))
           AddGadgetItem(#Combo, -1, "Image004", ImageID(#Img004))

          SetGadgetState(#Combo, 0)

               BindEvent(#PB_Event_CloseWindow, @CloseWindowEvent())
EndIf
Fred
Site Admin
Posts: 1506
Joined: Mon Feb 24, 2014 10:51 am

Re: Images in ComboBox

Post by Fred »

I don't think it's supported for now..
IdeasVacuum
Posts: 143
Joined: Tue Feb 25, 2014 1:27 pm

Re: Images in ComboBox

Post by IdeasVacuum »

:( It should be possible to load the images from a folder, just as the rest of the website does.
User avatar
Paul
Posts: 195
Joined: Wed Feb 26, 2014 6:46 pm
Location: Canada
Contact:

Re: Images in ComboBox

Post by Paul »

Since it's been 6 years, any chance we can have image support in the ComboBoxGadget now?

Or at least update the help file to show it is not supported.
Help file for ComboBoxGadget shows picture of ComboBoxGadget containing an image.
SetGadgetItemImage() says universal function that works with ComboBoxGadget
Post Reply