Yes, you can do this. In fact, just create a custom MXML component and instantiate it.

<?xml version...>
<!-- MyPrintableComponent.mxml -->
<mx:VBox ...>
... (other stuff you want)
</mx:VBox>

var p = PopUpManager.createPopUp(this, MyPrintableComponent, false);
p.visible = false;

Then you can print p. I haven't tried it, but it should work.

Manish

AC wrote:

Hi

Background: I have created a control which displays a DataGrid with a
header and footer showing simple information such as a title and a
time stamp. It's possible to scroll the grid and print each row of
data held in the grid. however, resizing of the grid is not possible
as it messes up the printing.

I am now trying to create the same control at runtime, this control is
NOT a "visible" UI component that can be view in the application, its
purpose it to be a print format control. This print control is a VBox
containing a HBox, DataGrid and an other HBox, inturn each HBox
contains 2 lables (making a total of four labels). To build this
control at design time is very straight-forwards, however, I am trying
to accomplish this, in memory, at runtime essentially a non-visual
control, and then send it to print.


Is this at all possible in flex?

Thanks






Yahoo! Groups Links












Reply via email to