ascii art

Just starting out? Need help? Post your questions and find answers here.
User avatar
braveheart
User
User
Posts: 37
Joined: Mon Jan 04, 2010 5:54 pm

ascii art

Post by braveheart »

Hi, is there a way to write extended ascii cmd style in editor gadget?
Nituvious
Addict
Addict
Posts: 1027
Joined: Sat Jul 11, 2009 4:57 am
Location: United States

Re: ascii art

Post 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
▓▓▓▓▓▒▒▒▒▒░░░░░
Vitor_Boss®
User
User
Posts: 81
Joined: Thu Sep 23, 2010 4:22 am

Re: ascii art

Post by Vitor_Boss® »

If your windows is > 98 Se your editor gadget supports Unicode texts.
You mean something like this?

Code: Select all

_____________†††______________
___________†††††††____________
_____________†††______________
_____________†††______________
______†______†††______†_______
_____†††_____†††_____†††______
___††††††††††††††††††††††††___
_____†††_____†††_____†††______
_______†_____†††_____†________
_____________†††______________
_____________†††______________
_____________†††______________
_____________†††______________
_____________†††______________
_____________†††______________
_____________†††______________
___________†††††††____________
____________†††††_____________
______________†_______________
Sorry by bad English.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
User avatar
braveheart
User
User
Posts: 37
Joined: Mon Jan 04, 2010 5:54 pm

Re: ascii art

Post 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=
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: ascii art

Post by ts-soft »

You mean this:

Code: Select all

CharToOem_(Text.s, Text.s)
?
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
braveheart
User
User
Posts: 37
Joined: Mon Jan 04, 2010 5:54 pm

Re: ascii art

Post by braveheart »

ts-soft i don't know how to use it :oops:

This one
FontID1 = GetStockObject_(#OEM_FIXED_FONT)
SetGadgetFont(#oText, FontID1)
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: ascii art

Post by ts-soft »

Changed the Text to Console Text: http://en.wikipedia.org/wiki/File:Codepage-437.png
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Vitor_Boss®
User
User
Posts: 81
Joined: Thu Sep 23, 2010 4:22 am

Re: ascii art

Post 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.
Sorry by bad English.
HP Pavilion DV6-2155DX: Intel i3-330m 2.13 / 4GB DDR3 / 500GB Sata2 HD / Display 15.6" LED / Win7 Ultimate x64 / PB 4.50 x86 demo.
Post Reply