[Gambas-user] I need a color selection box!

Rob sourceforge-raindog2 at ...94...
Fri Aug 27 06:00:44 CEST 2004


On Thursday 26 August 2004 23:15, Michael Sullivan wrote:
> How do I use it?  Can you give me an example?

Sure, off the top of my head, here goes.  I suppose I should add 
it to the wiki page, once i've actually verified that it 
compiles ;)

DIM mycolor AS Integer

IF Dialog.SelectColor() THEN ' true means "cancel"
  mycolor = Color.White ' my usual default
ELSE ' user picked a color
  mycolor = Dialog.Color
ENDIF

somecontrol.background = mycolor
' your control should now be a new color.

Rob





More information about the User mailing list