Adobe Dreamweaver Forums



Last 10 THreads :         Snippet Pod Problems (Last Post : Pat@ffic - Replies : 2 - Views : 3 )           »          DDX generated PDF Table of Contents issue (Last Post : Flashm@n - Replies : 0 - Views : 1 )           »          Array of Queries (Last Post : ptrott - Replies : 3 - Views : 4 )           »          image alignment (Last Post : alexander glomba - Replies : 0 - Views : 1 )           »          Problem with "Title" and DW CS4 (Last Post : emt79 - Replies : 0 - Views : 1 )           »          Importing Iweb to Dreamweaver (Last Post : tllearner - Replies : 2 - Views : 3 )           »          How to I get an FLV Skin to display on external sites? (Last Post : QADesign - Replies : 0 - Views : 1 )           »          Spry menu bar with a different image for each item? (Last Post : bongalook - Replies : 0 - Views : 1 )           »          Live View doesn't reflect changes to script (Last Post : phillip914 - Replies : 0 - Views : 1 )           »          Table cell - text formatting question (Last Post : JRStaf4ord - Replies : 7 - Views : 8 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-20-2008, 11:03 AM
Ithu_007
 
Posts: n/a
Diggs:
Default Need to print a particular chart from a page

Hi,

I have a page showing 4-5 charts. i need to get one particular chart printed
when i select the customized right click.
I'm stuck up here as i dont knw how to pass the object on which i clicked to
the contextmenuHandler.
Can anyone help me pls.

public function printWidget():void{

var contextMenu:ContextMenu = new ContextMenu();
contextMenu.hideBuiltInItems();
var menuItem:ContextMenuItem = new ContextMenuItem("Print Widget");
//menuItem.separatorBefore = false;

menuItem.addEventListener(
ContextMenuEvent.MENU_ITEM_SELECT,menuSelectHandle r);
contextMenu.customItems.push(menuItem);

this.contextMenu = contextMenu;
}
private function menuSelectHandler(event:ContextMenuEvent):void
{
var tempHeight:int = this.height;
var tempWidth:int = this.width;
//var printJob:PrintJob = new PrintJob();

var printJob:FlexPrintJob = new FlexPrintJob();

if( printJob.start() )
{
this.width = printJob.pageWidth * (8/9)
this.height = printJob.pageHeight * (8/9)
printJob.addObject(this);
}

printJob.send();

this.height = tempHeight;
this.width = tempWidth;
this.invalidateSize();
}



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-21-2008, 11:23 AM
SujitG
 
Posts: n/a
Diggs:
Default Re: Need to print a particular chart from a page

Hi,

In which component is the code above placed? can you please share code with charts also, so that it will be easy to help you out.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 10:52 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk