Notifications
Clear all
[Closed] dotnetObject button toolstrip item add error ?
Jun 21, 2013 5:51 pm
I tried using this control “System.Windows.Forms.ToolStripSplitButton” , using bellow method , but why I cant get it to work ?, i also try it as dotnetControl but I cant getit to work either…
Source = Toolstrip button
rollout dotNetSplitButton "Untitled" width:162 height:300
(
dotnetcontrol maskDotNet "System.Windows.Forms.Label" pos:[2,2] width:300 height:450
on dotNetSplitButton open do
(
dbNet=dotnetObject "System.Windows.Forms.ToolStripSplitButton"
maskDotNet.Controls.Add dbNet
)
)
createDialog dotNetSplitButton
Is there any ways to make it work
Thanks
2 Replies
Jun 21, 2013 5:51 pm
ToolStripSplitButton can be only the item of any ToolStrip. so you have to create ToolStrip, add ToolStripItem to its items, and add this tool strip to any other control:
rollout dotNetSplitButton "Untitled" width:162 height:300
(
dotnetcontrol lb "Label" pos:[2,2] width:300 height:450
on dotNetSplitButton open do
(
tm = dotnetobject "ToolStrip"
bt = dotnetObject "ToolStripSplitButton"
bt.Text = "Split Button"
tm.Items.Add bt
lb.controls.add tm
)
)
createDialog dotNetSplitButton
Jun 21, 2013 5:51 pm
ooooh…thanks many denisT… so the thing I add is mistake :banghead: …instead of toolstripButton , it should toolstrip… :bowdown: