|
Hi:
I create a spread cell, and try to set the style of the cell as a drop-down list. Ref the attachment, it’s a screenshot of MotionBuilder.
Here is my code.
// Setting the cell style as CellStyleView
m_Spread.GetColumn( ALSubItemIndex_list).Style = kFBCellStyleView; m_spread.GetColumn( ALSubItemIndex_list).Width = 15;
... // When adding an row
// Set the Cell as a layout, a list in this layout FBLayout fbLayout; fbLayout.AddRegion(
"List",
"List",
g_childWindowOffset, kFBAttachLeft, "", 1.0,
g_childWindowOffset, kFBAttachTop, "", 1.0,
g_buttonWidth * 2, kFBAttachNone, "", 1.0,
g_buttonHeight, kFBAttachNone, "", 1.0
)
FBList fbList; fbList.Style = kFBDropDownList; fbList.Items.InsertAt(0, "option1")
fbList.Items.InsertAt(1, "option2")
fbLayout.SetControl("List", fbList)
m_spread.SetCellView(ref, ALSubItemIndex_Profile, fbLayout.GetHIKtView("List"))
When I click the created cell, my tool crash.
So, is there someone know the right way to set the cell style as drop-down list, thank you so much!
|