Custom Font On Individual Row Items In A ComboBox Component

Hello everyone,
I am new to flash and I have spent many hours trying to get a
particular piece of functionality to work. I am trying to create a
combobox where the items listed in the combobox are font names and
each item will display using the font of the item label. For
instance, one item label in the list is "New Times Roman" and I
want that particular row in the combobox to have the text AND font
of "New Times Roman". For some reason, inside of my custom
CellRenderer class, I cannot seem to find a way to get the item
label that corresponds to the CellRenderer and the
CellRenderer.data item always appears to be null!
Please help. Thank you in advance for any help you can
provide.
This is the code I am currently using:
//From the main class, I am creating an instance of the
CustomizableComboBox and adding in the font names I am interested
in.
var comboFont:CustomizableComboBox=new
CustomizableComboBox();
comboFont.width=200;
comboFont.height=30;
comboFont.addItem({label:"Arial", data:"Arial"});
comboFont.addItem({label:"Times New Roman", data:"Times New
Roman"});
comboFont.addItem({label:"Tahoma", data:"Tahoma"});
comboFont.addItem({label:"Verda", data:"Verda"});
comboFont.addItem({label:"Wide Latin", data:"Wide Latin"});
comboFont.addItem({label:"Monotype Corsiva", data:"Monotype
Corsiva"});
comboFont.addItem({label:"Trebuchet MS", data:"Trebuchet
MS"});
comboFont.addItem({label:"Alba", data:"Alba"});
comboFont.addItem({label:"Arial Black", data:"Arial Black"});
comboFont.selectedIndex=1;//Times New Roman by default.
addChild(comboFont);
//In the CustomComboBox.as file, I have the CustomComboBox
class defined as:
package {
import fl.controls.ComboBox;
import flash.text.TextFormat;
import flash.events.Event;
public class CustomizableComboBox extends ComboBox{
public function CustomizableComboBox(){
super();
dropdown.setStyle("cellRenderer",CustomCellRenderer);
addEventListener(Event.CHANGE,changeIndex);
//Changes the text displayed as the currently selected item
with its corresponding font.
private function changeIndex(event:Event):void {
var fontName:String=selectedItem.label;
var format:TextFormat=new TextFormat(fontName,16);
setStyle("textFormat",format);
//Finally, in the CustomCellRederer.as file, I have defined
the CustomCellRenderer class as:
package{
import fl.controls.listClasses.CellRenderer;
import flash.text.TextFormat;
import fl.controls.ComboBox;
public class CustomCellRenderer extends CellRenderer{
public function CustomCellRenderer(){
//The trace will show that the data for the custom
cellrenderer is always null!!!
trace('custom cell data = '+data);
//If I could just get the item label corresponding to the
CellRenderer for this
//cell, then I could set the font as I desire.
var fontName:String="Wide Latin";
var format:TextFormat = new TextFormat(fontName,16);
setStyle("textFormat", format);
}

Oh, sorry. I see now what you want to do. Hmmm...
I cannot find any references to the class that defines each
item in the box. Off the top of my head what I would do (besides
writing my own combobox :-) - I would add some event listener with
capture set to true that would listen to the input text field
change Event.CHANGE and set ComboBox.editable = true. So, when you
type something in the item - it will dispatch event. By reading
Event.target, you may figure out what object is the TextField you
want to chage the style for. After that it may be possible just to
change style for each individual item's TextField.
myComboBox.editable = true;
myComboBox.addEventListener(Event.CHANGE, changeHandler);
private function changeHandler(e:Event):void{
trace(e.target + " : " + e.currentTarget);
Just a thought...

Similar Messages

  • Dunning Notice per Individual Line Items.

    We have a dunning requirement to print individual dunning notice per line item.  In fact, SAP standard form will give support for all open items of respective customer.  Recently, we have developed a form in such a way that it will consider only one Open line item and it is picking up fine. But the problem it is generating spool request for only first open line item. 
    In fact, our requirement to generate Dunning Forms (spool requests) for all other open items as well. 
    If anybody knows how to generate Dunning Form for Individual Open Items, please let us know.
    Please consider the above requirement on top priority basis, try to answer or atleast give clue how to achieve it.
    Regards.

    Hello Sekhar,
    I am not sure, but, it is not correct to do Dunning at Individual Line Item level (unlike correspondence).
    The reason is that, the Customer Master Data is normally updated once at the end of Dunning Run with the Latest Dunned Date and the appropriate Dunning Level.
    If you go for Dunning at individual Item Level, then it is obviously wrong to keep on updating Customer Master.
    Hope this info enables you to analyse in the right direction
    With Regards
    Vijay Gajavalli

  • Changing Colour and font of individual OAF pages

    Hi,
    Is it possible to change colour and font for individual OAF pages?I am aware of CUSTOM.xss but that changes it for the whole application.I want to make the changes for specific pages.
    Thanks,

    Try using HTML:
    Set the text to:
    area.setText("<html>My <b>Text</b> Here</html>");
    and see if the word Text is in bold. If so, then you can go as far as you want using HTML tags to set bold, color, etc.

  • Need to Convert Comma separated data in a column into individual rows from

    Hi,
    I need to Convert Comma separated data in a column into individual rows from a table.
    Eg: JOB1 SMITH,ALLEN,WARD,JONES
    OUTPUT required ;-
    JOB1 SMITH
    JOB1 ALLEN
    JOB1 WARD
    JOB1 JONES
    Got a solution using Oracle provided regexp_substr function, which comes handy for this scenario.
    But I need to use a database independent solution
    Thanks in advance for your valuable inputs.
    George

    Go for ETL solution. There are couple of ways to implement.
    If helps mark

  • To change a field to edit ,which is in customer fields tab of an item in crmd_order transaction.

    Hi All,
    My requirement is to change a "field to edit" which is in "customer fields tab" of an item in "crmd_order" transaction.
    Please find the screen shot.
    Please help me with this issue

    Use easy enhancement workbench
    The Easy Enhancement Workbench is a development tool with which SAP applications (called Business Objects in the following document) can be extended in a simple manner.
    Customer enhancements to a Business Object are defined via wizards. The Workbench then does all development work for the user; databank tables, screens and application logic are created automatically. Finally the customer enhancement is included in the SAP standard.
    This also allows users without ABAP knowledge the simple possibility of extending the SAP standard.
    An extension created using the Easy Enhancement Workbench does not differ technically from one created manually. In both cases transportable ABAP objects are created and the same Customer Exits, Business Transaction Events or BAdIs are implemented
    You need to use EEWB feature to achieve the same.
    Tutorial
    http://www.scribd.com/doc/6755615/Eewb-Steps
    http://help.sap.com/saphelp_crm50/helpdata/en/9f/a19c921f0911d6b1d500508b6b8b11/frameset.htm
    In addtion check this note
    Note 484597 - Customer enhancement of CRM applications
    a guide is attached to it for telling u steps
    Hope query is solved
    Regards
    Prakhar

  • Populating the custom filed - added in BOM item.

    Hello Friends,
    I have a requirement like, for the custom field added in BOM item data, it should come filled while executing the CS02/CS03/CS12/CS73....transactions.
    I have added a field which is one of the field from MARA table. what I have to do is to pass the MARA record into the custom field added based on IDNRK.
    This should happen as soon as enter button is pressed after entering material, plant, bom usage value.
    Please let me know if any exit is there wherein I can put the code OR if any other way!
    Thanks.

    i have solved this issue by doing some R&D.

  • Data Source  combine - Customer Invoice and Outbound Delivery Item Details

    Hello,
    I need create report where getting the outbound delivery item details ( like ship date, quantities, product, identified_stock)
    and also need invoice number ( customer invoice number) which is available in the Customer Invoice Header or Detail source.
    But try to create combined data source not able to join  Customer Invoice and Outbound Delivery Item Details.
    Since after adding any one of them as first datasource and try to add another data source from above then it doesn't shows up.
    Anybody have idea how to get the invoice information (invoice number) and shipping data.
    Thanks,
    Viral.

    Hi Viral,
    you only can comine data sources of the same access context. The customer invoice data sources have access context "company" and the outbound delivery sources have "site" or "sales". So unfortunately, you can`t combine these data sources.
    Best regards,
    Andreas

  • How to set custom font family in qml label in black berry 10 os

    how to set custom font family in label text  qml in black berry 10 OS

    AFAIK, this is not the correct way to set the image location.
    We call the working directory as context, so inside the context root along with WEB-INF, maintain a folder with name img and put all the images in that directory.
    You can use either .\<image_folder> or the optimum way would be (if you are using JSPs) to use getContext() method and traverse accordingly.
    FYI,,, using getContext() will give you context root directory, from there it is as simple as accessing any other folder.
    Hope this answers your question.
    Cheers,
    Jeets.

  • Editing a PDF file on Illustrator to maintain custom font from another computer

    Hello,
    I am trying to edit a PDF file on Adobe Illustrator and the file has a custom font in it that I do not have saved on my computer/Adobe does not recognize.  Is there a way to save the file so that I can edit it, but so that Adobe does not replace the font with a basic font?
    I have tried:
    -Opening it in AcrobatPro vs. Illustrator
    -Saving the PDF (2 pages) as 2 separate JPEG files and placing them into Illustrator... That just lowers the resolution of the images and they are much lower quality/more pixelated
    -Placing the PDF file in Illustrator rather than opening it in Illustrator
    None of those worked, and now I am not sure what to do.
    Please advice ASAP- Your help is much appreciated as I am on a time crunch!
    Thank you!

    You can do it with Acrobat. Not Acrobat reader.
    It is also possible with Preview.
    Open the file in Preview and export it say to the Desktop.
    Than open the second pdf and import the file.
    Than you can delete tha parts you so not need and leave only one page.
    It can be used if the pages are not too many or it will take a long time and I am not sure if it will work with big files.

  • How to distinguish individual rows in a view?

    As well known, we can use rowid to distinguish individual rows in a table. However, who know how to distinguish individual rows in a view? For there are not rowid in a view.

    I'm not sure I usnderstand your question, or at least I hope I don't.
    We do not use ROWID to distinguish rows in a table: we use unique iodentifiers, that is primary keys. A primary key is stable across the lifetime of a record: a rowid is guaranteed only for the lifetime of a transaction, and then only if we have locked that row.
    From this it follows, we should so design our views that each row in the view has a column, or combination of columns, that uniquely identify it.
    Cheers, APC

  • What is the best way to add and use custom fonts with Eloqua?

    We have a custom font that we'd like to use with Eloqua and were wondering how others might have successfully approached this.

    ~~Disclaimer: This answer refers to email fonts only - landing page font imports are discussed below~~
    Hi Brett,
    I took a look at these two posts: Re: Tips for getting the E10 email editor to change the email font for Outlook & other old-school email clients? and Re: E10 Fonts
    It seems that there are reasons as to why only a few of the fonts are supported. You can drill down into the source code to edit the font type, but I'm not sure that will get you anywhere.
    To drill down:
    To get the desired font & size in various clients (Gmail, Hotmail, Yahoo, Outlook) I found that specifying in the html works best.
    So whether it’s a P or TD, tag I add the style attribute & specify the font along with color & size.
    e.g.:
    <td style="LINE-HEIGHT: 18px; FONT-FAMILY: Arial, Helvetica, sans-serif; COLOR: #000000; FONT-SIZE: 12px;">
    Of course if you use the WYSIWYG editor you will have to view the html source & add this.

  • Grey out custom field in VA02 line item

    Hi,
    We have this custom field in sales line item which we want to grey out after billing is done. I tried many things but it didn't wrk. I wrote simple code w/o checking any billing condition like
             if screen-name = 'VBAP-ZZFIELD'.
                 screen-input = 0.
              endif.
             modify screen.
    but even this didn't wrk. Is there anything due to which the dynamic chging of screen fields attr has no effect ? Like if we set some attribute on screen field or ny thing else.
    Thx.

    You did put the code in MV45AFZZ include, form USEREXIT_FIELD_MODIFICATION?
    For example...
      if sy-tcode eq 'VA01' or
         sy-tcode eq 'VA02'.
      if sy-dynnr = my_screen_no.  "four digit screen no.
    loop at screen.
    case screen-name.
      when 'TABLE-FIELDNAME'   "exactly as it appears on that screen
        screen-input = '0'.
      modify screen.
    endcase.
    endloop.
    endif.
    endif.

  • Urgent: Custom font style not appearing in PDF output only

    Hi,
    For a customer, I received customer specific font styles(ttf font files) which I installed on my machine and then copied those files in Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\fonts as well as in JRE/lib/fonts. Then I created a template in word and font there appears as custom font.
    Now I am getting that font style in all output formats(rtf,ppt,excel) except the PDF output. I am using Oracle BI Publisher desktop alone. Not sure what I missed because of which text font is not changing in PDF version only. I checked the PDF properties and there also custom font is not getting mapped.
    Thanks in advance.

    Here is the link that describes how to set up the font mapping for PDF output: Look for "Font Mappings (for PDF output)"
    BI Publisher Demo Library&lt;/title&gt;&lt;meta name=&quot;Title&quot; content=&quot;BI Publisher Demo Library&quot;&gt;…http://www.oracle.com/technetwork/middleware/bi-publisher/learnmore/demo-library-toc-173301.html
    Thanks,
    Bipuser

  • Is there any way to link the individual rows of data to the corresponding bars in a bar chart so that each legend title appears simultaneously with its corresponding bar when creating a build? I can do it in a pie chart but can't in a bar chart.

    Is there any way to link the individual rows of data to the corresponding bars in a bar chart so that each legend title appears simultaneously with its corresponding bar when creating a build? I can do it in a pie chart but can't in a bar chart.

    You used the data.  Verizon can not see what it was sued for.  However your phone can see whats apps used the data.  go to settings-data usage- there will be a place that says data usage cycle.  line the dates up with your cycle.  then there will be a bar graph below that   extend bother white bars one all the way to the left and one all the way to the right.  after those are extended below that will be a list of apps,  there should be one that used over 2 gb and that will show you what app used that data in her purse

  • Custom Fonts In Oracle Report

    I have created a Custom Report (Output:PDF) using Oracle 9i, It has Custom Font, When I ran the report the custom fonts are displayed as special characters, Can someone please let me know how can i configure fonts to get picked up by report.

    Make sure you have a TTF file under the ORACLE_HOME/guicommon/tk/admin/TTF and an AFM for that missing under the ORACLE_HOME/guicommon/tk/admin/AFM directory.
    Modify the uifont.ali under the ORACLE_HOME/guicommon/tk/admin directory and add PDF Subsetting to reference the font. You'll want to open the AFM file to see what the "Font Family Name" parameter is. That is what you put on the left side of the "=" sign. The TTF file is what you reference in the right side of the equals sign. So, basically it is "Font Family Name"="TTF Font Name".
    Save the file, restart Reports Server, and run your report. Then it should work.
    IF you don't know how to generate an AFM file, I'd look at the ttf2pt1 utility. I used that utility to generate my AFM file (based on the TTF font).
    Now, this will not solve problems when sending it to the printer directly. BUt it will resolve it when generating a PDF and then printing to the printer that file output.
    Chris

Maybe you are looking for

  • How can I get keys from Hashtable in the same order?

    Hello, everyone. I have a Hashtable containing key-value pairs, I need to get the keys in the same order as I use method put(key,value) to save the key-value pairs. But I can only find Hashtable.keys() to fetch the keys in form of Enumeration and whe

  • FI-SL How to define  formula components ID(report painter)

    Hi Experts please teach me how to define formula components ID.(it is related to report painter) I cannot see by GS13(variable) Regards.

  • Mail Adapter  connection parameters

    Hi I have done the following scenario. /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address The source file is picked and in SXMB_MONI it shows checkered flag but not reaching the target. what should I give

  • Unicode error :MESSAGEG-I

    Hi , Please check below code: select-options:        s_re  for VARI-REPORT,        s_var for VARI-VARIANT. message e001(zg) with s_var+3 s_rep+3. I am getting error :<b>The sum of the offset and length (=34) exceeds the length of the start (=31) of t

  • Proper insert using a sub select

    I have always used: insert into table_x (field_1, field_2) select 'data_for_field_1', data_for_field_2 from table_y; This works no matter what. I have identified the following insert that works in 8i but not 8.0.5: insert into table_x (field_1, field