Format drop-down menu
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Format drop-down menu
Is there a way to format the menuitems of a drop-down menu?
I have searched the documentation and the archives of this forum but cannot find a reference.
Using the Inspector I can choose the font characteristics of the title of the button but I cannot seem to get the same font characterisitics in the drop-down list - it looks a bit clunky to have one font on the title and another in the drop-down list?
Thanks
Alex
I have searched the documentation and the archives of this forum but cannot find a reference.
Using the Inspector I can choose the font characteristics of the title of the button but I cannot seem to get the same font characterisitics in the drop-down list - it looks a bit clunky to have one font on the title and another in the drop-down list?
Thanks
Alex
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
When you're using the "Appearance Manager" look-and-feel, Revolution asks the operating system to draw the drop-down menus. You may have better luck when using a different look-and-feel (like Windows emulated) as the engine will then do the rendering by itself.
Jan Schenkel.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Hi Alex
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.
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:
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:
(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...

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.Is there a way to format the menuitems of a drop-down menu?
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.
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:Would be nice to have full control over the way objects look.
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
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 think custom controls are the way to go if you want a consistent look across different platforms.
Hoping that's help for you...

-
- Posts: 108
- Joined: Sun Mar 15, 2009 11:51 pm