Hi, As a simple test, I have tried this a while back, and found that it's not feasible.
I am unable to do this as I will have over several hundred app screens when the application is finally build. This approach, if it worked correctly, would require a lots a print layout screens, in my case almost one for one. This is not acceptable, an is the reason why I want to know what I am trying, is it feasible, > I am trying to create a print control/ layout 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, in turn 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 the printer. The idea is: If I can programmatically build a complex nested control (eg Lables inside HBox, which are in turn inside VBox which can have a variety of different sibling controls) and then send it to the print to SUCCESSFULLY print, I would save a lot of work and maintenance issues in the long run. Help and guidance from everyone is appreciated. Regards :-) --- In [email protected], Manish Jethani <[EMAIL PROTECTED]> wrote: > 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 > > > > > > > > > > > > > > > >

