typo in scripting manual? - EndGroupBox

Hi,
There seems to be 2 deadline script commands with the same name?
I’m trying to control the width of a GroupBox but it does not seem to be working! What’s the correct syntax?

Online manual states the following 2 commands:

void EndGroupBox( bool isCollapsed ) Ends the current group box, and specifies if the group box should be initially collapsed or not. Should be called after the controls have been added to the current group box.
void EndGroupBox( bool isCollapsed, int newWidth ) - Same??!!

Thanks,
Mike

These functions do the same thing, except one allows you to override the width (you’ll notice that the description text for each one is slightly different). That’s why they have the same name. Other functions that allow you to override the default sizes are AddControl, AddRangeControl, etc.

Using the one with the “newWidth” option should allow you to control the width of the group box. I just tested it here and it seems to work fine.

Cheers,

  • Ryan

OK, must be me doing something wrong…any ideas?

Using your script dialog UI as an example…

[code]def main():
global scriptDialog
global settings

dialogWidth = 500
dialogHeight = 654
labelWidth = 100
tabHeight = 600

scriptDialog.AddTabPage(“Tab Page 1”)
scriptDialog.AddGroupBox( “GroupBox1”, “Deadline Controls”, True )
scriptDialog.AddRow()

scriptDialog.EndRow()
scriptDialog.EndGroupBox( False,dialogWidth-20 )
scriptDialog.EndTabPage()[/code]

Mike

Just tested this simple code:

from Deadline.Scripting import *

scriptDialog = None
settings = None

def __main__():
	global scriptDialog
	global settings

	dialogWidth = 500
	dialogHeight = 654
	labelWidth = 100
	tabHeight = 600
	
	scriptDialog = DeadlineScriptEngine.GetScriptDialog()
	scriptDialog.SetSize( dialogWidth+24, dialogHeight )
	scriptDialog.SetTitle( "Script UI Example" )
	
	scriptDialog.AddTabControl("Example Tab Control", dialogWidth+16, tabHeight)
	scriptDialog.AddTabPage("Tab Page 1")
	scriptDialog.AddGroupBox( "GroupBox1", "Deadline Controls", True )
	scriptDialog.AddRow()
	
	scriptDialog.EndRow()
	scriptDialog.EndGroupBox( False,dialogWidth-20 )
	scriptDialog.EndTabPage()
	scriptDialog.EndTabControl()
	
	scriptDialog.ShowDialog( False )

When I run this code, I get the dialog shown in groupbox_20.png attached here.

groupbox_20.PNG

If I change the EndGroupBox line to the following, I get the dialog shown in groupbox_300.png.

scriptDialog.EndGroupBox( False,dialogWidth-300 )

groupbox_300.PNG

Very strange!
See attached zipped py file which is the exact one I am using to test.
Also, here is the error message I receive:
error_message.jpg

Mike
ScriptUIExample.zip (1.59 KB)

That script worked here just fine. In the Monitor that you’re running this script from, can you check the version number by selecting Help -> About… and let us know the full Deadline version number you see?

Thanks!
-Ryan

4.1.0.42497
Still running RC4, but plan to upgrade hopefully tomorrow to 42706.
Was there a bug between RC4 and the final?

I think the function that accepts 2 parameters was added between RC4 and the final release, so upgrading should fix this problem.

Cheers,

  • Ryan