Posted 18 years ago
by Kasper
Hi,
Okay, I'm a bit confused right now. It may be because I'm used to the DevExpress Bars in the Delphi environment, but I can't figure out the proper way to add items at runtime. For instance, I would like to use a Split button, and add items to it dynamically. I save a bunch of items to an XML file (for instance, templates or some other user generated content), and when my application loads, I would like to add all the items to this split button, making it possible for the user to activate the content in some way. I'm using a split button because I would like to be able to click the button without the list popping up as well. However, the documentation contains very little information about creating and adding stuff at runtime, which is a real shame imo :). I have tried getting a reference to the Split button through the BarManager, and then adding a newly created BarButtonCommand to the DefaultCommandLinks, but this does not seem to work (there are no items in the Split buttons menu). Please tell me how to do this, and perhaps a little more about generating and adding stuff at runtime :). When I finally do get the stuff added to the Split button, how will I react to users clicking on them?
Okay, I'm a bit confused right now. It may be because I'm used to the DevExpress Bars in the Delphi environment, but I can't figure out the proper way to add items at runtime. For instance, I would like to use a Split button, and add items to it dynamically. I save a bunch of items to an XML file (for instance, templates or some other user generated content), and when my application loads, I would like to add all the items to this split button, making it possible for the user to activate the content in some way. I'm using a split button because I would like to be able to click the button without the list popping up as well. However, the documentation contains very little information about creating and adding stuff at runtime, which is a real shame imo :). I have tried getting a reference to the Split button through the BarManager, and then adding a newly created BarButtonCommand to the DefaultCommandLinks, but this does not seem to work (there are no items in the Split buttons menu). Please tell me how to do this, and perhaps a little more about generating and adding stuff at runtime :). When I finally do get the stuff added to the Split button, how will I react to users clicking on them?