How is the built-in controls made?

Andre Garzia soapdog at mac.com
Wed Nov 9 11:54:44 EST 2005


On Nov 9, 2005, at 2:36 PM, Jan Sælid wrote:

> Hi Folks
>
> The more I program the more I want to customize my app, to make it  
> look and work like I want it to.
> As an example I want to build a custom tab panel. What I'm curious  
> about is how the built in tab panel
> in the tools palette is built. And where the script for those built  
> in controls is? I know how to make custom tab panel
> and usually I do it by building a group. But the built in tab panel  
> is actually a button. How is this possible?
>
> I think it also would be really useful to check out the script for  
> those built in controls. Like the scrollbar.
>
> Is it possible to peek inside? I would learn a lot I think.....
>
>
> Jan

Jan,

first I need to apologize for it's to early here in Brazil, so my  
comments might be as fuzzy as my head and eyes right now. I don't  
know how the built in tab panel is made, but, if you want to roll you  
own it's pretty easy if you can create your own images. A simple recipe:

1) Create images with all you tabpanel options, hilited and not, for  
example a tab panel with three options, would need three images, one  
for each option on the front.

2) create a group with the image as "header" (tab panel location) and  
a work area (where your controls will appear).

3) On the spot the user might click to switch panel, you put a  
invisible button or control just to trap the mouseUp message. On that  
message you switch your tab panel image and work area controls...

This is a simple tab panel with custom UI. This will work and look  
the same way accross platforms. Probably the User Interface gurus  
here have some other options which will probably be better than mine,  
but this is a simple example indeed.

PS: I understood that you wanted to pick on scrolbar and tabpanel,  
but since, I don't really know how, I tried my best on a custom  
solution.

cheers
andre


> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list