Textboxes

Post Reply
User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Textboxes

Post by rbytes »

Here is a demo of the new textbox capabilities that arrived with version 32. Some of the fonts I used were obtained from 1001fonts.com. You can download and install them or change the font names in my program code to fonts that you do have.

You can use an earlier posted program of mine called Font Viewer to find out the fonts on your system,

Code: Select all

''
Textboxes by rbytes
October 2017
''

sw,sh = #.scrsize()

' display
ds = #.textbox

ds.edit = 1
ds.multi = 0
ds.width = sw/3.2
ds.height = 70
c,d,e,f,g,h = ds
c.x = 150
c.y = 60
c.fontsize = 40
c.text = "Any background color"
c.backcolor(.5,.5,.7)
c.fontcolor(1,.7,1)
c.fontname = "Arial"

d.x = 600
d.y = 150
d.width = sw/2.7
d.edit = 0
d.fontsize = 40
d.text = "With or without box"
d.backcolor(.7,.5,0,0)
d.fontcolor(0,0,0,.5)
d.fontname = "Courier"

e.x = 100
e.y = 440
e.fontsize = 45
e.text = "Any font size"
e.backcolor(.4,.5,.8)
e.fontcolor(1,.6,0)
e.fontname = "Orbitron"

f.x = 700
f.y = 470
f.width = sw/3.5
f.fontsize = 45
f.text = "Any font name"
f.backcolor(1,1,.1,.5)
f.fontcolor(0,0,.8)
f.fontname = "Papyrus"

g.x = 100
g.y = 700
g.width = sw/2.5
g.height = 80
g.fontsize = 50
g.text = "Any font color"
g.backcolor(.5,.8,.0)
g.fontcolor(0,0,.8)
g.fontname = "Orbitron"

h.x = 650
h.y = 600
h.width = sw/2.5
h.height = 60
h.fontsize = 35
h.text = "Any font transparency"
h.backcolor(.5,0,0)
h.fontcolor(1,1,1,.5)
h.fontname = "Orbitron"

ds.text = "Any background transparency"
ds.fontsize = 35
ds.fontname = "Lucida Sans Typewriter"
ds.width = sw/2
ds.height = 60
ds.x = sw/4
ds.y = sh/3
ds.backcolor(.7,.9,.9,.3)
ds.fontcolor(0,0,.8)

#.show(ds,c,d,e,f,g,h)
Attachments
Screenshot (120).png
Screenshot (120).png (64.29 KiB) Viewed 2112 times
The only thing that gets me down is gravity...

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: Textboxes

Post by rbytes »

Something to be aware of when using fonts:

If you misspell a font name in the #.fontname function or x.fontname parameter, you will not get an error message. The default font will be used instead.
The only thing that gets me down is gravity...

Post Reply