Hi Alex
Is there a way to format the menuitems of a drop-down menu?
If you use a Pull Down, Option or Pop Up Menu, then there is no way you can alter the typeface of the menu items, as Jan wrote.
But if you use a ComboBox Menu, you can: what I mean is, the font and size changes the menu items for a ComboBox, and as the chosen menu item appears in the main box when the ComboBox Menu is closed, the same font and size (as well as the menu pick) is shown.
Would be nice to have full control over the way objects look.
Chipp Walters has written many very useful, most-excellent stacks, some for designing custom controls, two that spring to mind is Custom Button Objects stack:
http://www.altuit.com/webs/altuit2/RunRev/Downloads.htm
and Custom Scrollbars in Revolution:
http://blog.chipp.com/search?updated-ma ... -results=7
(Klaus and Mark have also written stacks for custom scrollbars, found in RevOnline).
There is also an excellent plugin stack for creating gradient background effects but more importantly, custom controls for checkboxes, buttons and sliders, etc., called Interface Designer:
http://www.altuit.com/webs/hemingway/Pr ... oducts.htm
Anyhow, back to Menu Buttons:
I had the problem of altering the appearance of a menu button a couple of months ago and came up with a solution which works well:
1) Drag a ComboBox button to your stack. Put your menuPick menuItem code in this button, as usual.
2) Create your ComboBox button custom look in Photoshop or similar, saved as jpg or png; place this on top of your comboBox button to hide it.
3) In this new image script, put:
Code: Select all
on mouseDown
set the enabled of me to false
end mouseDown
OK, all's fine here, except the chosen menu item is now hidden, so:
4) Drag a Field to the stack, size it and place it over the image (the "bar" bit, not the picture of the "hold-down arrow", if you see what I mean). Enable Visible and Lock Text only. I'll call it it FieldA.
5) Now go back to the script of the original button and add at the end:
Code: Select all
global gFormPick
on menuPick whichItem
-- blah
-- blah
--blah
put whichItem into gFormPick
put gFormPick into field "FieldA"
end menuPick
(I can't remember if a global is absolutely necessary, perhaps a local or even a temporary variable will do...)
I think custom controls are the way to go if you want a consistent look across different platforms.
Hoping that's help for you...
