GUI, text?

Blitz3D Forums/Blitz3D Beginners Area/GUI, text?

Apollonius(Posted 2003) [#1]
I have theses questions,

when ur using the GUI interface, i suppose u use labels to display text in the window, however how do u set colors? how do you center the text? how do you change line I heared its chr$(10) but u cant use it twise?


Perturbatio(Posted 2003) [#2]
a newline for windows is chr$(10)+chr$(13) (newline + carriage return), for linux, it is just chr$(10)

regarding the other things, I can't help you since I don't own B+ (which is what I assume you are talking about).


CS_TBL(Posted 2003) [#3]
Recently I'm using canvases with my own text routines, using my own font-system.. looks nicer, and you've more options such as textures, colors etc.

Try it, you might actually like it..


Apollonius(Posted 2003) [#4]
Not very proffessionnal if you have to use Canvas no?


CS_TBL(Posted 2003) [#5]
maybe... maybe not.. but atm it's the only way to have full visual control over 'textlabels' ..

and besides, if your whole app is kinda texturised anyway, then it looks uniform.. it's a matter of style, not professionalism.


Apollonius(Posted 2003) [#6]
ok I have a question for you

Text 0,0,"Hello There!",True,False
Flip

I dont see the text on the canvas
("
mnMCanvas = CreateCanvas( 0,0,450,362,mnPanel )
SetGadgetLayout mnMCanvas,1,0,1,0

SetBuffer (CanvasBuffer(mnmcanvas))
")
I dont see the text, maybe its black? how do you change the color of the text?


moravcik(Posted 2003) [#7]
if you're using a canvas, you need to use the flipcanvas command rather than just flip. Change the flip to

flipcanvas mnMCanvas

HTH