label colors

BlitzPlus Forums/BlitzPlus Programming/label colors

Lazze(Posted 2004) [#1]
Is there a way to change the color of labels?

Lazze


skn3(Posted 2004) [#2]
The standard label control in windows can only be grey, black or white. Blitz doesn't have the feature to change color.

There isn't a solution in blitz, so you have to take the next option, which is use a canvas. Not suitable, but your only choice.


Lazze(Posted 2004) [#3]
Too bad as resizing canvases stretches the image/text but I'll just have to work around it.
Thanks anyway...

Lazze


CS_TBL(Posted 2004) [#4]
http://www.blitzbasic.co.nz/Community/posts.php?topic=32067

perhaps you'll find this intersting ..


Lazze(Posted 2004) [#5]
I just tested it and - NICE!!! :o) I'm considering to implement it in my project. Allthough - it lacks a resize or SetGadgetLayout feature, as resizing is a very common occurrance in my app.

Lazze


CS_TBL(Posted 2004) [#6]
yeah.. what I made is not a real gadget (not in the same style as the other gadgets), if you want to resize it you need to make your own resize function that resizes the canvas, that's the trade-off, but as long as there aren't any new gadgets in B+ .... :) (see the tutorial section for my tutorial about custom gadgets)


Lazze(Posted 2004) [#7]
I've thought about a solution, and I think I'm going to use double-layer canvas (if you get my point). The top layer is fixed in size to match the text, while the bottom layer (the parent-canvas) is resizable. With no text on the parent-canvas, there's no visible stretching.

Lazze