Ability to add controls to viewer toolbar

Stimulsoft Reports.Flex discussion
Locked
jakrzysztow
Posts: 18
Joined: Tue Aug 09, 2011 10:35 am

Ability to add controls to viewer toolbar

Post 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
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Ability to add controls to viewer toolbar

Post 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.
Locked