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

Images in ComboBox

by IdeasVacuum Thu Jan 08, 2015 6:19 am

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: 1298
Joined: Mon Feb 24, 2014 10:51 am

Re: Images in ComboBox

by Fred Thu Jan 08, 2015 10:25 am

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

Re: Images in ComboBox

by IdeasVacuum Thu Jan 08, 2015 10:51 pm

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

Re: Images in ComboBox

by Paul Thu May 28, 2020 2:23 pm

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
Return to Feature Requests and Wishlists

Who is online

Users browsing this forum: No registered users and 4 guests