*choking*
(so much code)
Thanks Chinny
On 7/22/05, Jason Brynford-Jones <chinny(at)softimage.com> wrote:
> http://www.xsibase.com/tools/plugins.php?detail=1112
>
> This is a plugin I wrote which dynamically changes the layout, whem
> changing a combo box
>
> I think it should suffice
>
> -----Original Message-----
> From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf
> Of Bernard Lebel
> Sent: Friday, July 22, 2005 1:46 PM
> To: XSI(at)Softimage.COM
> Subject: [script] Disable/hide UIItem in PPGLayout
>
> Hello,
>
> I have a little ppg, with 3 parameters. The first two are text fields.
> The third is a combo. Basically I want that when switching the combo,
> one of the two parameters gets either disabled (read-only), or
> completely hidden.
>
> I'm very new to this stuff, I haven't found any info about such a
> thing in the docs. Any suggestion? Below is my code, I hope it won't
> get too massacred by formatting...
>
>
> Thanks
> Bernard
>
>
>
> function XSILoadPlugin( in_reg )
> {
> in_reg.Author = "Bernard Lebel";
> in_reg.Name = "MyPropertyPlugin";
> in_reg.Major = 1;
> in_reg.Minor = 1;
> in_reg.RegisterProperty( "MyProperty" );
> return true;
> }
>
>
> function MyProperty_Define( io_Context )
> {
> var oCustomProperty = io_Context.Source;
> oCustomProperty.AddParameter2( "text1", siString, "", null,
> null,
> null, null, 0, siPersistable );
> oCustomProperty.AddParameter2( "text2", siString, "", null,
> null,
> null, null, 0, siPersistable );
> oCustomProperty.AddParameter2( "combo", siString, "text1", null,
> null, null,null, 0, siPersistable );
> }
>
>
> function MyProperty_DefineLayout( io_Context )
> {
> var oLayout = io_Context.Source;
> oLayout.Clear( );
>
> aArray = new Array( "text1", "text1", "text2", "text2" );
>
> oLayout.additem( "text1" );
> oLayout.additem( "text2" );
> oLayout.AddEnumControl( "combo", aArray, "Choose",
> siControlCombo );
>
> oLayout.Logic = MyProperty_OnInit.toString() +
> MyProperty_combo_OnChanged.toString()
> }
>
>
> function MyProperty_OnInit( )
> {
> }
>
>
>
> function MyProperty_combo_OnChanged( )
> {
> var oLayout = PPG.PPGLayout;
>
> var oPPGItem = oLayout.Item( "text1" );
>
> // DISABLE/HIDE HERE!!!
>
> PPG.Refresh()
> }
>
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
> body:
> unsubscribe xsi
>
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
> unsubscribe xsi
>
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi