Home   Archive   Permalink



change the text style in a button

button 100x50 font-size 16 bold 'Effort' [print 'Effort']
    
hi , how to change the font to Times New Roman
for example.
    
Thanks for your attention

posted by:   Mennohexo     26-Jun-2017/12:54:03-7:00



On my Windows 10 computer, I went to the Control Panel and then to the fonts, and observed the font names. Thanks to Nick's little trick of obtaining the "button" source code, I discovered an attribute called the font "name." I tried modifying the button font name with a font name from the Control Panel, as shown below, and it worked.    
    
R E B O L [
     Title: "Button font test"
]
view center-face layout [
     banner "Button font and color test"
     button 300x40 "Default"
     button 300x40 "Times New Roman" font [
         colors: [255.0.0 0.255.0]    
         name: "Times New Roman"
         size: 20
     ]
     button 300x40 "Bauhaus 93 Regular" font [
         colors: [255.0.0 0.255.0]    
         name: "Bauhaus 93 Regular"
         size: 20
     ]
     button 300x40 "Brush Script MT Italic" font [
         colors: [255.0.0 0.255.0]    
         name: "Brush Script MT Italic"
         size: 20
     ]
     button 300x40 "Haettenschweiler Regular" font [
         colors: [255.0.0 0.255.0]    
         name: "Haettenschweiler Regular"
         size: 20
     ]
     button 300x40 "Showcard Gothic Regular" yellow font [
         colors: [0.255.0 0.0.255]    
         name: "Showcard Gothic Regular"
         size: 20
     ]
     button 300x40 "Quit" [quit]
]

posted by:   Steven White     27-Jun-2017/15:02:38-7:00



thanks. good stuff

posted by:   mennohexo     27-Jun-2017/17:40:33-7:00