January 19, 2020, 05:59:52 am

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Region button image not showing

Started by Andy, July 12, 2018, 10:05:27 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

This is probably a simple you for someone, but I just can't see it.

The second button bitmap is not showing, the path is correct.

Code Select
CONTROL mainmenu,@RGNBUTTON,"",309,148,187,161,@CTLBTNFLAT,BUT_login

hrgn = RGNFROMBITMAP("C:\\1\\red.bmp")

SETFONT mainmenu,"Arial",14,800,0,BUT_login
SETCONTROLCOLOR mainmenu,BUT_login,RGB(0,0,0),RGB(0,0,0)
SETBUTTONRGN mainmenu,BUT_login,hrgn
SETBUTTONBITMAPS mainmenu,BUT_login,LOADIMAGE("C:\\1\\red.bmp",@IMGBITMAP),0,0

CONTROL mainmenu,@RGNBUTTON,"",500,148,187,161,@CTLBTNFLAT,BUT_help

hrgn2 = RGNFROMBITMAP("C:\\1\\gray.bmp")

SETFONT mainmenu,"Arial",14,800,0,BUT_help
SETCONTROLCOLOR mainmenu,BUT_help,RGB(0,0,0),RGB(0,0,0)
SETBUTTONRGN mainmenu,BUT_help,hrgn2
SETBUTTONBITMAPS mainmenu,BUT_help,LOADIMAGE("C:\\1\\grey.bmp",@IMGBITMAP),0,0


I'm just getting a black button instead.

Thanks,
Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

without your specific images I can't test your code
BUT, what strikes me odd is that you're using your region "mask" also as the image you are displaying.

I have always created my mask in black(the outside color) and white(the inside color). Yes, I know you can use any two colors.
And then my displayed image(s) has always been totally unrelated to the rgn image.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Larry,

I was simply using the rgn_button example.

Once they had become 32 bit colour, the problem went away.

Thanks,
Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.