Need an ImageButton

BlitzPlus Forums/BlitzPlus Programming/Need an ImageButton

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Well, I've got this, but we need some way to keep the panel on top of the button before it'll work...

Type colorbutton
Field button,panel
Field red,green,blue
End Type

Function CreateColorButton(x,y,w,h,parent,red=255,green=255,blue=255,style=0)
Repeat
n=n+1
s$=s+"  "
Until n=w/8
button=CreateButton(s+"| v",x,y,w,h,parent)
;Note that "style" won't do anything, it's just ther because it is in most functions.
SetGadgetLayout button,1,1,1,1
panel=CreatePanel(x+6,y+4,w-25,h-8,parent,1)
SetGadgetLayout panel,1,1,1,1
SetPanelColor panel,red,green,blue

c.colorbutton=New colorbutton
c\button=button
c\panel=panel
c\red=red
c\green=green
c\blue=blue
End Function


Unless I have the wrong idea of what you want... but anyhow, this is the type of thing you see in places like "Display Properties".