Page 1 of 1

ascii art

Posted: Mon Feb 07, 2011 8:24 pm
by braveheart
Hi, is there a way to write extended ascii cmd style in editor gadget?

Re: ascii art

Posted: Mon Feb 07, 2011 9:42 pm
by Nituvious
braveheart wrote:Hi, is there a way to write extended ascii cmd style in editor gadget?
Something like this?

Code: Select all

OpenWindow(#PB_Any,0,0,250,250,"test",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)

stuff = EditorGadget(#PB_Any,5,5,240,240)

For z = 0 To 255
	AddGadgetItem(stuff,0,Chr(z))
Next z

Repeat : Delay(10)
	eventID = WaitWindowEvent(1)
Until eventID = #PB_Event_CloseWindow

Re: ascii art

Posted: Mon Feb 07, 2011 10:00 pm
by Vitor_Boss®
If your windows is > 98 Se your editor gadget supports Unicode texts.
You mean something like this?

Code: Select all

_____________†††______________
___________†††††††____________
_____________†††______________
_____________†††______________
______†______†††______†_______
_____†††_____†††_____†††______
___††††††††††††††††††††††††___
_____†††_____†††_____†††______
_______†_____†††_____†________
_____________†††______________
_____________†††______________
_____________†††______________
_____________†††______________
_____________†††______________
_____________†††______________
_____________†††______________
___________†††††††____________
____________†††††_____________
______________†_______________

Re: ascii art

Posted: Wed Feb 09, 2011 4:23 pm
by braveheart
Nituvious, Vitor_Boss®, like that but with cmd type style.

I found the answer, but thank you :)
http://www.purebasic.fr/english/viewtop ... highlight=

Re: ascii art

Posted: Wed Feb 09, 2011 4:35 pm
by ts-soft
You mean this:

Code: Select all

CharToOem_(Text.s, Text.s)
?

Re: ascii art

Posted: Wed Feb 09, 2011 5:09 pm
by braveheart
ts-soft i don't know how to use it :oops:

This one
FontID1 = GetStockObject_(#OEM_FIXED_FONT)
SetGadgetFont(#oText, FontID1)

Re: ascii art

Posted: Wed Feb 09, 2011 6:14 pm
by ts-soft
Changed the Text to Console Text: http://en.wikipedia.org/wiki/File:Codepage-437.png

Re: ascii art

Posted: Wed Feb 09, 2011 6:24 pm
by Vitor_Boss®
You can change the codepage to use others ASCII characters.

Look: http://www.science.co.il/language/local ... s=codepage Click on CodePage number to see.