Adobe Dreamweaver Forums



Last 10 THreads :         Re: SFW and date created (Last Post : Ramón_G_Castañeda@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: sRGB vs. Adobe (1998) RGB (Last Post : Ramón_G_Castañeda@adobeforums.com - Replies : 0 - Views : 1 )           »          help me with adjustments layers in CS4 (Last Post : eddie caruso - Replies : 3 - Views : 4 )           »          "Save As" crashes PS (Last Post : Ann_Shelbourne@adobeforums.com - Replies : 3 - Views : 4 )           »          CreateODBCDate and cfqueryparam with cf_sql_date (Last Post : -==cfSearching==- - Replies : 1 - Views : 2 )           »          Change custom Vector class to new Vector class in player10 (Last Post : flexstone - Replies : 2 - Views : 3 )           »          Changing background of image (Last Post : Linda Rathgeber - Replies : 4 - Views : 5 )           »          Spellcheck and CFExecute (Last Post : Fetch - Replies : 1 - Views : 2 )           »          old syntax? (Last Post : David Mainstreet - Replies : 2 - Views : 3 )           »          Re: sRGB vs. Adobe (1998) RGB (Last Post : Ramón_G_Castañeda@adobeforums.com - Replies : 0 - Views : 1 )           »         


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 11:55 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.
Inactive Reminders By Mished.co.uk