Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17



Posted on 1998-09-28
Medium Priority
Last Modified: 2013-12-26
I have created a dialog box in ResEdit, it consists of username and password text fields and a series of checkboxes. The dialog box is called by an AppleScript via the Scripting Addition "DialogRunner".
In ResEdit I want to change the Font used in the password field so that all characters display as bullets. I have found a custom FONT resource from another application which uses a password field in one of its dialogs, so I can copy this resource into my ResEdit dialog. But I dont know what to do next. Any Help?????
Question by:gormenghast
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Accepted Solution

boonstra earned 400 total points
ID: 1291550
To change the font of a dialog item, you need to add an Item Color Table Resource ('ictb').  ResEdit, unfortunately, can create/edit these resources only in hex.  If you have Resorcer, it can create them via a GUI.  Assuming you have only ResEdit, you'll need to go to Mac Toolbox Essentials to get the ictb format.  You can get this at <>.  The ictb resource is described in the Dialog Manager chapter on page 6-158.  The format is too difficult to describe here, but here is what it looks like for a DLOG / DITL resource pair (128) with a single edit text item.  The ictb resource has the same resource ID as the DITL.  To change the edit text item font to Times 10, the ictb looks like:

0000: 8007  Item data, change font, typeface, font size
0002: 0004  Item offset to text style table
            (start of text style table)
0004: 0018  typeface offset
0006: 0000  font style 0
0008: 000A  font size 0x0A
000A: 0000  red text color component
000C: 0000  green text color component
000E: 0000  blue text color component
0010: FFFF  red text bkgd component
0012: FFFF  green text bkgd component
0014: FFFF  blue text bkgd component
0016: 0000  text mode (1==srcOr, etc.)
0018: 0554  "\pTimes"
001A: 696D
001C: 6573

If bit 15 of the item data is not set, then the typeface field contains the number of a font family instead of an offset to a typeface name.  This is what I would recommend for you, although that means you need to create a FOND resource as well

Author Comment

ID: 1291551
I am afraid this is beginning to look a bit too complicated for me. I am not familiar with Hex. I checked out the dialog manager chapter you mention, but need a bit more elementary guidance.
Is it possible to change the font information for individual edit text items rather than all. If so how do you specify each one, is this something to do with item offsets. I am probably asking a bit too much here but I was hoping this was going to be something easy to acheive as it appears so often in application dialogs.
I have looked at other applications which use password fields etc in ResEdit but it has not helped much. From one application I found a FONT resource containing a diamond shaped bitmap font.
The resource is as follows:

3200      0 Font Family: .Pwd
3212      200 .Pwd 12

There was however no corresponding FOND resource.
Also in this particular app there is no DITL for the main dialog which uses the password field.

I have not got resorceror, are there any other GUI editors available? I have searched the internet and downloaded some documentation (

The other option I have is to take all my scripting into Facespan and build a dialog here, then I can catch the keystrokes in the text field etc. I really dont want to do this however as it will run much slower than it does with a ResEdit dialog.

Hope you can help some more.

Expert Comment

ID: 1291552
First, most applications that protect passwords by using bullets do so programmatically, by intercepting keyDown events and substituting a bullet character.  This has many advantages, including the fact that someone who Cuts the password and Pastes it into a text editor will not be able to see the password, whereas they would if all you do is change the font.

Your limitation is that you are not writing a program, and thus are limited to the features AppleScript gives you.  Nevertheless, it is possible to do what you want using the technique described above.  The app you describe almost certainly creates the DITL programmatically, on the fly, which is why you don't see it in a resource file.

It is possible to change the font on an item-by-item basis, either programmatically, or by the 'ictb' resource described in the original answer.

I'm not aware of any other resource editors besides ResEdit and Resorcerer.

I think we need to actually exchange files in order for me to be more helpful.  If you post your email address, I'll contact you privately.

Author Comment

ID: 1291553
Hi boonstra
Thanks again for being so helpful, I realise I am being a pest and a bit out of my depth. I will play around with the ictb resource and see if I can get my head round it.
I do understand the security concept you mention (cut & paste), but this is not a problem.
My email address is


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question