Re: buttons...
On Wed, 11 Dec 2002 12:34:46 +1100, Patrick.Barnes at transgrid.com.au
wrote:
>copy the way that MS Word and wordpad handle colours..
...
>How do I make a button's background a different color?
Use an xpm with a solid background, eg
sequence test test =3D {
"24 24 13 1",
" c None",
"B c #808080", -- the background
". c #000000",
"+ c #E4E4DC",
"@ c #BE7579",
"# c #C67D81",
"$ c #2D2D2D",
"% c #8A4D4F",
"& c #9E575B",
"* c #A75E5F",
"=3D c #AF6668",
"- c #B66D71",
"; c #CD8689",
"> c #080808",
"BBBBBBBBBBBBBBBBBBBBBBBB",
"BBBBBBBBBBBBBBBBBBBBBBBB",
"BBBBBBBBBBBBBBBBBBBBBBBB",
"BBBBBBBBBBBBBBBBBBBBBBBB",
"BBBBBBBBBBBBBBBBBBBBBBBB",
"BBBBBBBBBB.........BBBBB",
"BBBBBBBBBB.++++++..BBBBB",
"BBBBBBBBBB.++++++..BBBBB",
"BBBBBBBB...++++++..BBBBB",
"BBBBBBBB. at .++++++..BBBBB",
"BBB...... at #.++$.+..BBBBB",
"BBB.%&*=3D- at #;.+.$+..BBBBB",
"BBB.%&*=3D- at #;.++++..BBBBB",
"BBB...... at #.+++++..BBBBB",
"BBBBBBBB. at .++++++..BBBBB",
"BBBBBBBB...++++++..BBBBB",
"BBBBBBBBBB.++++....BBBBB",
"BBBBBBBBBB.++......BBBBB",
"BBBBBBBBBB...>>>>>>BBBBB",
"BBBBBBBBBBBBBBBBBBBBBBBB",
"BBBBBBBBBBBBBBBBBBBBBBBB",
"BBBBBBBBBBBBBBBBBBBBBBBB",
"BBBBBBBBBBBBBBBBBBBBBBBB",
"BBBBBBBBBBBBBBBBBBBBBBBB"}
change the background colour, eg
test[3][7..12]=3D"FF0000" -- Red
and stick it on the button
setBitmap(Button,createDIB(xpmToEuBmp(test)))
I would imagine that the drop-down is just a very narrow button next
to the normal sized button.
There is a simple palette I inherited in the editor, see options.ew
Apparently someone is going to post about 2,500 xpm files real soon
now.
Pete
|
Not Categorized, Please Help
|
|