This is not currently possible, however you can specify the size of the
window if you show it using a View instead of calling InspectObj.
This is an example from the OM Reference (View object):
/*
This example demonstrates how we can host a Custom Property
inside a View.
This has some advantages over the InspectObj command:
-we can specify the exact size and positioning of the window
-the view is exposed in the Layout.Views collection so we can
find out if the property page is already being "inspected".
However it does not support the "Modal" mode supported by
InspectObj.
*/
// Step 1: Create the custom property
var oPSet = ActiveSceneRoot.AddProperty( "CustomProperty", false, "MyProp" );
oPSet.AddParameter3( "textparam", siString ) ;
oPSet.AddFCurveParameter( "MyFCurve" ) ;
var oLayout = oPSet.PPGLayout ;
oLayout.Clear() ;
oLayout.AddItem( "textparam" );
oLayout.AddItem( "MyFCurve" );
oLayout.AddRow()
oLayout.AddButton( "MoveView", "Move View" ) ;
oLayout.AddButton( "Close" ) ;
oLayout.EndRow()
oLayout.Language = "JScript"
oLayout.Logic = MoveView_OnClicked.toString()
+ Close_OnClicked.toString() ;
// Step 2: Show the custom property in a view
var oActiveLayout = Application.Desktop.ActiveLayout;
var oNewView = oActiveLayout.CreateView( "Property Panel", "MyPropView" );
oNewView.BeginEdit();
oNewView.Move( 10, 10 );
oNewView.Resize( 340, 340 );
oNewView.SetAttributeValue( "targetcontent", oPSet.FullName );
oNewView.EndEdit();
// Logic code used by the buttons on the Custom Property
function MoveView_OnClicked()
{
// We can't get to the view directly from the PPG object,
// but we can find it indirectly by searching through
// the open views
var thisCustomProp = PPG.Inspected.Item(0).FullName
var oActiveLayout = Application.Desktop.ActiveLayout
for ( var i = 0 ; i < oActiveLayout.Views.Count ; i++ ) {
var oView = oActiveLayout.Views(i) ;
if ( oView.Type == "Property Panel" ) {
if ( oView.GetAttributeValue("targetcontent") == thisCustomProp ) {
// found it!
oView.Move( 250, 250 ) ;
return ;
}
}
}
}
function Close_OnClicked()
{
// Self destruction of the custom property
DeleteObj( PPG.Inspected.Item(0) ) ;
PPG.Close() ;
}
-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM]On Behalf
Of Bernard Lebel
Posted At: Monday, July 18, 2005 9:44 AM
Posted To: xsi
Conversation: PPG height
Subject: PPG height
Hello,
Anyone knows if there is a way to set the height of a ppg layout? I
have several items in my ppg, and a scrollbar appears. However I'd
like to set the height so there is no scrollbar.
Thanks
Bernard
---
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