Page 1 of 1

Format drop-down menu

Posted: Mon Dec 29, 2008 12:19 am
by skindoc4
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

Posted: Mon Dec 29, 2008 6:53 am
by Janschenkel
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.

Posted: Mon Dec 29, 2008 7:39 am
by skindoc4
mmm - I thought it might be something like that. Would be nice to have full control over the way objects look.

I shall try your suggestion - thanks Jan

Alex

Posted: Mon Dec 29, 2008 12:58 pm
by gyroscope
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...

:)

Posted: Tue Dec 30, 2008 1:12 am
by skindoc4
That's just great, gyroscope :P (your name?)

I try to keep my interfaces simple and intuitive so the idea of having just a few custom controls really appeals. I was thinking about it but you have basically shown me how to approach the problem - thank you.

Alex

Posted: Tue Dec 30, 2008 1:26 pm
by gyroscope
Glad it was of help, Alex. :)
That's just great, gyroscope (your name?)
My username, gyroscope, is fine, or David, Dave, Spider or even oi you! :wink:

Posted: Tue Dec 30, 2008 2:01 pm
by SparkOut
And where do you live?
What's your credit card number? (including the 3 numbers on the back) :lol:

Posted: Tue Dec 30, 2008 7:47 pm
by gyroscope
Image
:wink:

Posted: Wed Dec 31, 2008 1:03 am
by SparkOut
:lol: very funny!

Actually - roughly where in Kent? You may not be too far from me!

Posted: Wed Dec 31, 2008 3:21 am
by skindoc4
OK - oi you!

I am an old bloke so i like names and since i am in Oz, first ones. I find usernames impersonal.

Seriously - thanks David

Alex

Posted: Wed Dec 31, 2008 2:04 pm
by gyroscope
Your most welcome, Alex.
roughly where in Kent?
Sunny Gravesend (where I've lived for 98% of my life, for interest). It'd be a small world if you live just up the road, SparkOut! :)

PS Happy New Year to one and all!!

Posted: Wed Dec 31, 2008 3:22 pm
by SparkOut
Happy New Year too.

I used to work in Dartford, driving up the A2 past Gravesend every day. I live in Sittingbourne!

Posted: Wed Mar 18, 2009 1:45 am
by maverickalex
Blimey i went to the sea Training College at Gravesend what seems like Eons ago!!! :D