same way you add controls to other controls
for the toolbar, you would find the index representing the target cell
control and just use the add function passing in the control you want to
add.
Thanks for your reply. But I didn't understand you clearly.
If I use ToolBar.Controls.Add(), I can add a control to the ToolBar.
but the layout it isn't what I expected. Because I want to replace
a ToolBarButton. Can you give me a simple sample code? Thanks
Alvin Bruney said:
same way you add controls to other controls
for the toolbar, you would find the index representing the target cell
control and just use the add function passing in the control you want to
add.
right, so you need to remove a button first
toolbar.cells[x].remove() and then add.
sorry, my VS studio took a crap and i am re-installing. maybe tonight i can
find the code and post it
Thanks for your reply. But I didn't understand you clearly.
If I use ToolBar.Controls.Add(), I can add a control to the ToolBar.
but the layout it isn't what I expected. Because I want to replace
a ToolBarButton. Can you give me a simple sample code? Thanks
Alvin Bruney said:
same way you add controls to other controls
for the toolbar, you would find the index representing the target cell
control and just use the add function passing in the control you want to
add.
I look up in the MSDN. ToolBar control seems have not a property called
"Cells".
Confusing. Waiting for your reply! Thanks again.
Your Sincerely
Leon
Alvin Bruney said:
right, so you need to remove a button first
toolbar.cells[x].remove() and then add.
sorry, my VS studio took a crap and i am re-installing. maybe tonight i can
find the code and post it
Thanks for your reply. But I didn't understand you clearly.
If I use ToolBar.Controls.Add(), I can add a control to the ToolBar.
but the layout it isn't what I expected. Because I want to replace
a ToolBarButton. Can you give me a simple sample code? Thanks
Alvin Bruney said:
same way you add controls to other controls
for the toolbar, you would find the index representing the target cell
control and just use the add function passing in the control you want to
add.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.