Printing to another line

BlitzPlus Forums/BlitzPlus Programming/Printing to another line

WolRon(Posted 2004) [#1]
Is it possible to set the text of a gadget to more than one line?

For example, the text for a button, I may want to say:

Click here
to accept.

In VisC++, I could set the above text with something like: "Click here\nto accept.", where \n = a new line.

Is there an equivalent way to do this in B+?


WolRon(Posted 2004) [#2]
Too bad no one here in Blitzville is smart enough to answer my question... :)


semar(Posted 2004) [#3]
I never tryed something like that until now, but perhaps you can try with something similar to visC++.

For example, try to set the text with :
button_text$ = "Click here" + chr(10) + chr(13) + "to accept"


Perhaps it works. Try all the combination of chr(10) and chr(13) - that is, only 10, only 13, first 13 and then 10, and so on.

Hope it helps,
Sergio.


skn3(Posted 2004) [#4]
The correct order is chr(13) + chr(10)


soja(Posted 2004) [#5]
Regardless, it doesn't work. I also tried sending the BM_SETSTYLE message to the button with a BS_MULTILINE parameter, but it didn't seem to help either. <shrug>


skn3(Posted 2004) [#6]
There is some wierd redraw issue with b+.

When you set the style via sendmessage, try also resizing the button it will probably update.