Normal Topic Menu Tree font size changes (Read 483 times)
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Menu Tree font size changes
Feb 9th, 2007 at 1:47am
Print Post Print Post  
From the Inside Sesame, September 2005 article on Menu Trees is this example line:
Code
Select All
n = @RelabelTreeItem(“CCC!Forms!Add Data”,”@mAddData”) 

Regarding the "undocumented" font size changer with RelabelTreeItem(), what other values exist besides "@m" for "medium"?

I am guessing that "@s" might work for "small", and "@l" might work for "large" and "@s" for "super size it"? Huh

Is there "@d" for default Sesame value (hmm, no "@letter" would be the Sesame default, never mind that one  Embarrassed).

Can we also change the font in addition to the size?

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Menu Tree font size changes
Reply #1 - Feb 9th, 2007 at 2:11am
Print Post Print Post  
The reason these are "undocumented" is because some of them will cause the tree to be drawn kinda funny. Additionally, they are not universal, won't work in many contexts, and may be ignored or overridden. But, in any case, here is a table of the possible values from the FLTK documentation:

@. Print rest of line, don't look for more '@' signs
@@ Print rest of line starting with '@'
@l Use a large (24 point) font
@m Use a medium large (18 point) font
@s Use a small (11 point) font
@b Use a bold font (adds FL_BOLD to font)
@i Use an italic font (adds FL_ITALIC to font)
@f or @t Use a fixed-pitch font (sets font to FL_COURIER)
@c Center the line horizontally
@r Right-justify the text
@B0, @B1, ... @B255 Fill the backgound with fl_color(n)
@C0, @C1, ... @C255 Use fl_color(n) to draw the text
@F0, @F1, ... Use fl_font(n) to draw the text
@S1, @S2, ... Use point size n to draw the text
@u or @_ Underline the text.
@- draw an engraved line through the middle.

I see that the document says "points", but that is unlikely. It may be points, but I suspect it is meant to read pixels.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Menu Tree font size changes
Reply #2 - Feb 9th, 2007 at 5:38am
Print Post Print Post  
Thanks Mark

I understand that these are not currently supported by Lantica and if used by me are being used at my own risk.

I do believe that points is correct, but may not translate correctly.  72 points on paper = 1 inch height. 

This wil probably be converted somewhat, but should be good as a relative measurement constant. 
36 point will be one half the height of 72 point, and 12 point will be one-third of 36 point. 
So the number of pixels will be a function of the screen/printer resolutions.  Higher resolutions will have more pixels for the same point value.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged