Community
print control.Items #prints the selected characters on selection
varTest = 0
for x in control.Items:
if x.IsSelected(varTest):
x.Items.append(chararacterList.Name)
def ClosePopupCallback(control, event):
characterList=[]
for x in Items:
if x.selected (True):
x.Items.append(chararacterList.Name)
CloseTool(t)
def CreateTool():
global tool
tool = CreateUniqueTool("Property Example")
tool.StartSizeX = 400
tool.StartSizeY = 200
PopulateLayout(tool)
ShowTool(tool)
CreateTool()
...
def PopulateLayout(mainLyt):
x = FBAddRegionParam(0,FBAttachType.kFBAttachLeft,"")
y = FBAddRegionParam(0,FBAttachType.kFBAttachTop,"")
w = FBAddRegionParam(0,FBAttachType.kFBAttachRight,"")
h = FBAddRegionParam(25,FBAttachType.kFBAttachBottom,"")
mainLyt.AddRegion("main","main", x, y, w, h)
vlyt = VBoxLayout()
mainLyt.SetControl("main",vlyt)
l = FBLabel()
l.Caption = "Drag and drop a model into the container. Double click to clear."
vlyt.Add(l,30)
tool.model = None
tool.container = FBContainer()
tool.container.OnDragAndDrop.Add(EventContainerDragAndDrop)
tool.container.OnDblClick.Add(EventContainerDblClick)
vlyt.Add(tool.container,30)
...
...
tool.myDropDownList = FBList()
tool.myDropDownList.Style = FBListStyle.kFBDropDownList
for obj in myList:
tool.myDropDownList.Items.append(obj.Name)
lyt.Add(tool.myDropDownList, 20) #add line 2 with 20 pixels from the top
...
def ButtonCallback(control, event):
myList = tool.myDropDownList.Items
print tool.myDropDownList.Items+" is ready to be processed"
# put the rest of the script here
Can't find what you're looking for? Ask the community or share your knowledge.