Steve,

This VTM code will do exactly what you need.

You'll be using a built in control called ColorPicker.

You'll have to open the VTM file that you want the colorpicker in and add
the control and attributes.

If you want to test this file save it as colorpicker.vtm and place it in:
DRIVE:\Program Files\Macromedia\ColdFusion Studio
5\Extensions\TagDefs\Custom
or
DRIVE:\Program Files\Allaire\ColdFusion Studio 4.5\Extensions\TagDefs\Custom

If you have questions, let me know.


It's pretty simple if you examine the code below:

<!-----
created by: Joseph DeVore - [EMAIL PROTECTED]
date: 11/21/2001 6:55:13 PM
notes: select a color from colorpicker
----->

<tag name="COLORPICKER">

<editorlayout width=100 lfwidth=150 height=150 lfheight=150 width="360">
<container type="TabDialog" name="MainTabDialog" width="360"
height="MAXIMUM" lfheight="MAXIMUM" maxwidthpadding=0>

        <container type="TabPage" name="MainTab" caption="color picker"
width="MAXIMUM">
                <container type="Panel" name="pnlMain" width="MAXIMUM" height="MAXIMUM"
lfheight="MAXIMUM" maxwidthpadding=5 right=5 down=5>
                        <control type="ColorPicker" name="colorColor" width="140"
lfwidth="MAXIMUM" anchor="lblColor" align="center" right=5 down="25"/>
                </container>
        </container>

</container>
</editorlayout>

<attributes>
        <attrib name="COLOR" control="colorColor"       type="Color"
cachefamily="Colors"/>
</attributes>

<tagdescription>
        <font face="Arial" size="3">SELECT A COLOR FROM THE LIST</font>
</tagdescription>

<attribcategories>
        <attribgroup name="Required" elements="color"/>
</attribcategories>

<taglayout trimwhitespace="No">
        <wizif optionlowercasetags eq 'true'>
                <wizset mytag   = 'color'>
        <wizelse>
                <wizset mytag   = 'color'>
        </wizif>

        <wizset tagname = defaultcase('color')>

        <wizif OPTIONLinearLayout eq 'true'>
                <wizset vertspacinggap =  ' '>
        <wizelse>
                <wizset vertspacinggap = chr(13) & chr(10) & editortagindentstring &
repeatstring(' ',(len(tagname)+2))>
        </wizif>
        <wizset spacinggap = ' '>

        <wizif 1><$$tagname</wizif>
        <wizif colorcolor neq
''>$$SpacingGap$${DefaultCase('color')}="$$colorColor"<wizset spacinggap =
vertspacinggap></wizif>

        <wizif tagdataunknownattributes neq
''>$$SpacingGap$$TAGDATAUnknownAttributes</wizif>
        <wizif 1>></wizif>
</taglayout>
</tag>


Joseph DeVore
VeloxWeb Technologies




-----Original Message-----
From: Steve Reich [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 21, 2001 6:01 PM
To: CF-Talk
Subject: Re: VTM Files


> Ummm...are you talking CF Studio?  It already has a colour picker built in

I realize that, but when the user selects 'Edit Tag' and pulls up the
tageditor dialog, I want them to fill one of the fields with a color value.
How can I access the color picker from within the VTM?

Thanks,
Steve


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to