March 28, 2024, 01:52:56 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


bitmapbutton

Started by Doc, May 31, 2007, 10:49:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Doc

Hi Paul,
After trying a number of things with some success this evening, I got around to trying out the bitmap button example and ran into some troubles. Hopefully you can shed some light on it.

The SETCONTROLCOLOR function doesn't appear to be functional yet (won't compile), but is there something special that has to be done to make the bitmap button work?

extern _argc as int
extern _argv as pointer

declare cdecl extern gtk_init(argc as pointer,argv as pointer)
declare cdecl extern gtk_main()
declare cdecl extern gtk_main_quit()

$main

gtk_init(&_argc,&_argv)

DEF w1 as WINDOW
OPENWINDOW w1,0,0,350,350,@MINBOX|@MAXBOX|@SIZE,NULL,"Bitmap Button",&main
CONTROL w1,@BUTTON,"",0,0,100,100,@CTLBTNBITMAP,3
gtk_main()
END

SUB main

SETCONTROLTEXT w1,3,GETSTARTPATH + "Bug.bmp"

' SETCONTROLCOLOR w1,3,RGB(0,255,0),RGB(255,0,0)

IF @MESSAGE = @IDCLOSEWINDOW
CLOSEWINDOW w1
                gtk_main_quit()
ENDIF
RETURN
ENDSUB


My code above compiles without error, but upon execution, all that is displayed in the button is the path. Has it just not been worked in yet or do I have it coded wrong?

-Doc-

P.S. Linked lists and SYSTEM calls are working as intended. :)

Ionic Wind Support Team

No bitmaps or bitmap buttons yet.  Infact there aren't any bitmaps on Linux, that is a Windows image format. Haven't decided what I am going to do there yet.

As for button colors....Gnome controls those as they are all part of the current theme.  I haven't looked into overriding the default element colors yet. 

Paul.
Ionic Wind Support Team