Notifications
Clear all

[Closed] Set pixels vs bitmap image

Light, your method is great! I was using the method shown in mxs reference where you get all the pixel values in an image and store them then you create a bitmap from them… Got to change some stuf around now

Anton

Hey Guys,
Interesting thread! I wrote a struct library while back that does all this with one or two lines of code! It may need some cleaning up to go public.

Basically, you assign a button’s image like this:

iconUtils.setButtonIcon ro1.btn1 #load
iconUtils.setButtonIcon ro1.btn2 #save
 
iconUtils.setButtonIcon ro1.btn3 #refresh fg:green
iconUtils.setButtonIcon ro1.btn4 #cross fg:red

And you convert b/w icons to code like this:

iconUtils.getIconDefs "c:/temp/icons/*.bmp" 

The last bit is essential, as it means you can easily add your own icons to the library. I’ll have a look, add some comments and get something online.

Cheers,
Dave

Hey Dave,

It looks very interesting. I will be sure to take a look.

Light

Nice one Dave, looks promising. I’ll look forward to seeing it. That is exactly the sort of thing which could save loads of time when designing and building UIs.

Page 2 / 2