Page 1 of 1

Ability to add controls to viewer toolbar

Posted: Tue Aug 09, 2011 10:41 am
by jakrzysztow
We have a default report and then some other reports. We'd like to be able to have a drop-down or combo box (or any other controls for that matter) to the toolbar for the viewer.

I don't believe this is possible at the moment, but hoping for in to be added in the near future!

Great product by the way!

Jeffrey A. Krzysztow

Ability to add controls to viewer toolbar

Posted: Wed Aug 10, 2011 3:12 am
by Vladimir
Hello, Jeffrey

It is possible. Please try the following code:

Code: Select all

import stimulsoft.controls.visual.StiComboBox;

...

var comboBox: StiComboBox = new StiComboBox();
comboBox.width = 150;
comboBox.height = 22;
comboBox.dataProvider = [
	{label: "Value 1", value: 123},
	{label: "Value 2", value: true},
	{label: "Value 3", value: "some value"}
];
comboBox.selectedIndex = 0;

var viewer: StiViewerFx = report.showDialog();
viewer.panelMain.addChild(comboBox);
viewer.panelMain.setChildIndex(comboBox, 0);
Thank you.