Ominous vibes about custom button menus & scrolling fiel

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Contact:

Ominous vibes about custom button menus & scrolling fiel

Post by gyroscope » Sat Jun 07, 2008 12:28 am

Hi, I've recently purchased a brill piece of software from Altuit called Interface Designer (and can highly recommend it + it's "as cheap as chips" as they say here in the UK).

There are two aspects of customization examples missing however, namely menu buttons and field scrollbars, and I have this ominous feeling that it's not possible to customise these...I really hope you can, otherwise these default aspects would stick out like a sore thumb in my particular interface design...

First the button menus (in my particular instance, Option Menu buttons). I've tried to change the appearance of these without success. For instance, I changed the Fill to a different colour and nothing changes. But it shows up if I change to Look and Feel > MacOS Platinum Emulated. I can change the text colour of course, no prob, but I'd want a rectangular option menu, flat background colour, flat colour at the arrows end of things, and different coloured arrows. (I also tried with a vain attempt to bring the menu design in as an image and put a pass "menupick" to button "Option Menu"...hmm, as if that would have worked! (and even if it had, the menuitems would still be showing the wrong background colour...)

Then the field scrollbars: I found a neat stack by Klaus showing a custom scrollbar (a banana...hee! :)) so I'm hoping that'll save the day there (although I'm a bit concerned whether or not "set the vScroll of field "MyField" to the formattedHeight of field "MyField" will still work, to keep the scrollbar at the bottom of the field...I'll have to experiment with that...) It seems a shame that it can't be changed in a straightforward manner via the Inspector...

If anyone could shed more light on to this I'd be grateful, thanks!

:)

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Sat Jun 07, 2008 2:39 pm

Hi gyroscope,

yeah, my famous banana :-D

Concerning "combo boxes", "option buttons" and scrollbars of fields.

I'm afraid you cannot change the look of these objects, since they are supplied by the underlying OS, so they look like a Mac on a Mac etc.

You will have to build your own, sad, but true.


Best

Klaus

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Sat Jun 07, 2008 3:20 pm

Big banana grin... Hah, those were the days...

If you are interested, I have a little stack on revOnline called propscroll, that lets you have a proportional thumb for a scrolling field.

user: malte
stack: propscroll

It is rather old, but should still work.

All the best,

Malte

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sat Jun 07, 2008 4:32 pm

gyroscope,

With making one of your own, Klaus means you can use stack panels instead of an actual menu. You can set this panel in the property inspector.

There is a very basic example of this in my user space, named Mark, on RevOnline. The stack is called Sample Menu.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Contact:

Post by gyroscope » Mon Jun 09, 2008 12:09 am

Thank you very much Klaus, Malte and Mark for coming to the rescue there; very happy that there are solutions here. :)

Klaus and Malte, your individual solutions to the custom scrollbar are impressive to me; I wouldn't have worked that out in a month of Sundays...
Could I ask please: do you think that when I try to weave in an amended "set the vScroll of field "MyField" to the formattedHeight of field "MyField" into either script I'll have success there? (I'll have to change vScroll to something else, I guess; perhaps it'll become more clear when I've studied your scripts again).

Mark, terrific stuff, the light at the end of that particular tunnel is there now. The only thing is, I would want an OptionMenu or ComboBox Menu style rather than PullDown/PopUp style, so I'll try to modify it some time this week, fingers crossed that'll be possible....

Thank you again, guys! :D

gyroscope
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 404
Joined: Tue Jan 08, 2008 3:44 pm
Contact:

Post by gyroscope » Mon Jun 09, 2008 9:53 pm

Hi, just for the record/interest, I've sussed my custom menu button a different way now (but thank you all the same Mark; I now understand stack menus):

I decided to use a PullDown Menu instead of an Option Menu (but now thinking about it, I'm pretty much certain that the following would work with an Option Menu as well). I used a field with the correct background colour/text colour, and put the text of it as the first menuitem of the PullDown Menu; this field overlays the menuitem area exactly. The menuPick handler in this button would include: "put whichPick into field "Field". Then created my button "arrow end of things" graphic and overlaid this onto the right end of the menu, making the graphic's enabled to false.

And its up and running just fine, so I'm very pleased. The only thing is that using Windows emulated, I see that the background colour of the pulldown items reverts to white, but I can live with that.

So I'm definitely home and dry now, thank you all once again.

:)

Post Reply