Page 1 of 1

Stacks in Mac OS X or Windows ?

Posted: Mon Aug 10, 2009 12:14 pm
by Dixie
Good morning....

If we are all sitting comfortably, then I shall begin. I have made a stack on a Mac... I have also run the stack under Windows XP and everything looks fine.

The problem that I have is that the stack was sent to a friend so that he could have a look over it. The first complaint that he had was that the font was too large in the option menus and some of the longer options were too long to show in the option menu.

I don't seem to have had this problem when sharing stacks that just run under the Mac OS.

What is the solution to this for running a stack made on a mac that will also run under Windows ? Is it to set everything to the Windows XP system font, 'Tahoma', along with a set text size through the text formatting option of the property inspector for all the controls?

Posted: Mon Aug 10, 2009 8:54 pm
by Mark
Hi Dixie,

If you haven't paid attention to fonts, you might see that the font is usually Lucida Grande on the Mac and Tahoma or Arial on Windows. If a the textfont of a field is not explicitly defined, you might be surprised by unexpected font changes. If the textfont is defined but doesn't exist on other platforms, you may experience the same surprise on those other platforms.

One solution is to set the textfont of all objects to Arial. This isn't too elegant, but you will probably avoid surprises and it is a good quick fix.

A better solution is to write a script to change the font of all objects to whatever suits the platform. For example:

Code: Select all

on preOpenStack
  if the platform is "MacOS" then
    put "Lucida Grande" into myFont
  else
    put "Arial" into myFont
  end if
  repeat with x = 1 to number of fields
    set the textFont of fld x to myFont
  end repeat
end preOpenStack
This is a very quick example. You probably will need to change it a little, to take the particularities of your own stack in account.

Best,

Mark

Posted: Tue Sep 22, 2009 2:06 pm
by paulclaude
You could also set the textFont of all objects to empty and change only the textFont of the stack (if I'm not wrong, all objects without a specified font adopt the stack font).

Code: Select all

on preOpenStack
  if the platform is "MacOS" then
    set the textFont of this stack to "Lucida Grande"
  else
    set the textFont of this stack to "Arial"
  end if
 end preOpenStack