Datagrid hScrollPolicy problem with cellRenderer

Hi all, I'm having a problem which I can't seem to solve. I'm using a cellRenderer to display icons in a dataGrid. All works fine until I type in the command myDg.hScrollPolicy = "auto". Once I issue that command, the icons stop displaying. If I remove that line, all works well once more. Has anyone had this strange behaviour?

Not real sure. The components in AS2 are very strange. I didn't encounter that one before it was just a guess based on their pickiness(if that's a word). The AS3 components seem to be a major upgrade. I actually just built most of my components myself for AS2. They were light weight and easy to customize, however the datagrid is very difficult. Good luck!

Similar Messages

  • Display Problems with CellRenderer for JList and JRE 1.2.2

    I'm using a CellRenderer to handle a JList as below. The problem is that with the JRE 1.2.2, I'm getting bizarre artifacts like choosing an item in the list and having every item above it go bold, then choosing another item in the list and having all items go unbold. This works fine with the JDK, but when run with the JRE the cell renderer goes amok. Any suggestions? Could it just be my card? (the Matrox G400 Max is documented to have Java display problems) or did I miss something in the class? Thanks.
    class EB_ListCellRenderer extends JLabel implements ListCellRenderer, EditorConstants{
    private final String[] text;
    private Font plain = new Font("Arial",Font.PLAIN,12);
    private Font bold = new Font("Arial",Font.BOLD,12);
    public EB_ListCellRenderer(String[] text) {
         this.text = text;
    public Component getListCellRendererComponent(JList list,Object value, int index,boolean isSelected,boolean cellHasFocus)
         setText(text[index]);
         setEnabled(true);
         setOpaque(true);
         setForeground(FOREGROUND);
         if (isSelected) {
         setFont(bold);
    setBackground(SELECTED);//color
         } else {
         setFont(plain);
         setBackground(UNSELECTED);
         return this;

    I found a solution for Matox Gxx cards. If you lower the hardware accelleration down one notch, it will most likely help you to display java gui's correctly.
    Hope this helps.
    ..ec

  • DataGrid highilght problem with ItemRendered Text

    I have a datagrid with some elements that are defined as
    using an itemrenderer:
    <mx:DataGrid id="dg" dataProvider="{dp}" >
    <mx:columns>
    <mx:DataGridColumn headerText="header"
    dataField="element" itemRenderer="dgRenderer" />
    Now, the item renderer just lists what text should be there:
    override public function set data(value:Object):void
    this.text = "new text";
    So, as far as it goes, this works fine (all app-specific
    stuff ripped out, but you get the idea). The text does show up in
    the datagrid correctly. However, when I mouse over the datagrid,
    normal (i.e. not-item-rendered) items get a dark background, and
    change their font to a gray color. However, item-rendered objects
    appear in black text, always.
    Does anyone know why that is, or how I can solve it?
    Thanks for any help you can provide.
    -Brand

    "BrandG" <[email protected]> wrote in
    message
    news:g7i3ne$8c4$[email protected]..
    >I have a datagrid with some elements that are defined as
    using an
    >itemrenderer:
    >
    > <mx:DataGrid id="dg" dataProvider="{dp}" >
    > <mx:columns>
    > <mx:DataGridColumn headerText="header"
    dataField="element"
    > itemRenderer="dgRenderer" />
    >
    > Now, the item renderer just lists what text should be
    there:
    >
    > override public function set data(value:Object):void
    > {
    > this.text = "new text";
    > }
    >
    > So, as far as it goes, this works fine (all app-specific
    stuff ripped out,
    > but
    > you get the idea). The text does show up in the datagrid
    correctly.
    > However,
    > when I mouse over the datagrid, normal (i.e.
    not-item-rendered) items get
    > a
    > dark background, and change their font to a gray color.
    However,
    > item-rendered
    > objects appear in black text, always.
    >
    > Does anyone know why that is, or how I can solve it?
    >
    > Thanks for any help you can provide.
    Here are some options:
    1) Just use a labelFunction
    2) Extend the default itemRenderer
    3) Look at the code for the default itemRenderer and see how
    it handles
    this
    HTH;
    Amy

  • Problem with CellRenderer

    Hi everybody.
    Look at this piece of code:
    package graphics;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.awt.*;
    import java.util.*;
    public class EssaiJTable extends JTable {
        /** Creates a new instance of EssaiJTable */
        public EssaiJTable() {
            super(new DefaultTableModel(10,  10));
            for(Enumeration e = this.getColumnModel().getColumns(); e.hasMoreElements();) {
                TableColumn column = (TableColumn) e.nextElement();
                column.setCellRenderer(new MyCellRenderer());
        private class MyCellRenderer extends JLabel implements TableCellRenderer {
            public MyCellRenderer() {
                this.setHorizontalAlignment(SwingConstants.CENTER);
            public java.awt.Component getTableCellRendererComponent(JTable jTable, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
                if(isSelected) this.setBackground(new Color(0x49aba6));
                else this.setBackground(Color.WHITE);
                if(value == null) this.setText("");
                else this.setText(value.toString());
                return this;
        public static void main(String[] args) {
            JFrame frame = new JFrame();
            frame.getContentPane().setLayout(new FlowLayout());
            frame.getContentPane().add(new EssaiJTable());
            frame.pack();
            frame.setVisible(true);
    This code works fine fine, i mean the content of the cells appears in the center of the CellRenderer (my CellRenderer).
    Now look at this code: I think I do axactly the same thing, with other several things:package frontOffice.autres;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import frontOffice.applets.AppletResultats;
    import java.util.*;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2003</p>
    * <p>Company: </p>
    * @author unascribed
    * @version 1.0
    public class VueResultats extends JFrame {
    private AppletResultats applet;
    private JTable tableau = new JTable(new DefaultTableModel(){
    public boolean isCellEditable(int row, int column) {
    return false;
    private JScrollPane scrollPane = new JScrollPane(tableau);
    public VueResultats(AppletResultats applet) {
    super("R�sultats enregistr�s");
    this.applet = applet;
    this.getContentPane().setLayout(new FlowLayout());
    this.setContentPane(this.scrollPane);
    scrollPane.setViewportView(tableau);
    scrollPane.setPreferredSize(new Dimension(400, 100));
    String codebaseHost = applet.getCodebasesHost();
    tableau.getTableHeader().setDefaultRenderer(new HeaderRenderer(codebaseHost));
    DefaultTableModel model = (DefaultTableModel) tableau.getModel();
    model.addColumn("Ann�e");
    model.addColumn("Chiffre d'affaire");
    model.addColumn("B�n�fice");
    model.addColumn("Concerne");
    for(Enumeration e = tableau.getColumnModel().getColumns(); e.hasMoreElements();) {
    TableColumn column = (TableColumn) e.nextElement();
    column.setCellRenderer(new MyCellRenderer());
    System.out.println("xxx");
    this.pack();
    this.setResizable(false);
    this.update();
    public void update() {
    DefaultTableModel model = (DefaultTableModel) this.tableau.getModel();
    Vector resultats = this.applet.getResultats();
    model.setRowCount(resultats.size());
    int i = 0;
    for(Enumeration e = resultats.elements(); e.hasMoreElements(); i++) {
    Resultat resultat = (Resultat) e.nextElement();
    tableau.setValueAt(resultat.annee(), i, 0);
    tableau.setValueAt(resultat.chiffreA(), i, 1);
    tableau.setValueAt(resultat.benefice(), i, 2);
    tableau.setValueAt(resultat.concerne() ? "Votre entreprise" : "Votre groupe", i, 3);
    System.out.println(tableau.getCellRenderer(0,0));
    private class MyCellRenderer extends JLabel implements TableCellRenderer {
    public MyCellRenderer() {
    this.setHorizontalTextPosition(SwingConstants.CENTER);
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
    if(! isSelected) this.setBackground(Color.WHITE);
    else this.setBackground(new Color(0x49aba6));
    this.setText(value.toString());
    return this;
    public static void main(String args[]) {
    new VueResultats(new AppletResultats()).setVisible(true);
    And with this code, the text of my cells appear in the left of the cell ?
    Why ???????????
    Please help me.

    According to the JLabel api:
    public void setHorizontalAlignment(int alignment)Sets the alignment of the label's contents along the X axis.
    This is a JavaBeans bound property.
    Parameters:
    alignment - One of the following constants defined in SwingConstants: LEFT, CENTER (the default for image-only labels), RIGHT, LEADING (the default for text-only labels) or TRAILING.
    See Also:
    SwingConstants, getHorizontalAlignment()
    public void setHorizontalTextPosition(int textPosition)Sets the horizontal position of the label's text, relative to its image.
    Parameters:
    textPosition - One of the following constants defined in SwingConstants: LEFT, CENTER, RIGHT, LEADING, or TRAILING (the default).
    Throws:
    IllegalArgumentException
    See Also:
    SwingConstants
    When in doubt, consult the appropriate documentation for the class/method that you're using!
    ;o)
    V.V.

  • Problem with checkbox item renderer in datagrid

    I have a data grid having check box as an item renderer. I have viewed many posts in this forum but nothing useful in my case. I am failed to bind my datagrid itemrenderer checkbox with the field of dataprovider i.e. listUnitMovement.CHECK_PATH. Then I have to traverse data provider to check which checkboxes are checked.
    [Bindable]
    var listUnitMovement:XMLList=null;                      
    In a function call
    public function init(event:ResultEvent):void
        listUnitMovement=event.result.unitmovement;
         <mx:DataGrid id="dg_country"
                               dataProvider="{listUnitMovement}"
                                  enabled="true">
                                <mx:columns>
                                   <mx:DataGridColumn>
                                        <mx:itemRenderer>
                                            <mx:Component>
                                                <mx:CheckBox selectedField="CHECK_PATH"  />
                                            </mx:Component>                                       
                                        </mx:itemRenderer>
                                    </mx:DataGridColumn>
                                    <mx:DataGridColumn headerText="Latitude" dataField="NEW_LAT" visible="false"/>
                                    <mx:DataGridColumn headerText="Longitude" dataField="NEW_LONG" visible="false"/>
                                   <mx:DataGridColumn>
                                        <mx:itemRenderer>
                                            <mx:Component>
                                                <mx:Button label="Details"/>
                                            </mx:Component>                                       
                                        </mx:itemRenderer>
                                    </mx:DataGridColumn>
                                </mx:columns>
                            </mx:DataGrid>

    Hi,
    Do you want to just check/uncheck the checkboxes based on the CHECK_PATH field.
    Do you want something like this...
    <?xml version="1.0" encoding="utf-8"?><mx:Application  xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
     <mx:Script>
    <![CDATA[
     import mx.collections.ArrayCollection;[
    Bindable] 
    private var listUnitMovement:ArrayCollection = new ArrayCollection([{CHECK_PATH:true,NEW_LAT:109.233,NEW_LONG:232.22},{CHECK_PATH:true,NEW_LAT:109.233,NEW_LONG:232.22},{CHECK_PATH:false,NEW_LAT:133.233,NEW_LONG:702.22}]);]]>
    </mx:Script>
     <mx:DataGrid dataProvider="{listUnitMovement}">
     <mx:columns>
     <mx:DataGridColumn>
     <mx:itemRenderer>
     <mx:Component>
     <mx:CheckBox selectedField="CHECK_PATH" change="data.CHECK_PATH=selected" />
     </mx:Component>  
    </mx:itemRenderer>
     </mx:DataGridColumn>
     <mx:DataGridColumn dataField="NEW_LAT"/>
     <mx:DataGridColumn dataField="NEW_LONG"/>
     </mx:columns>
     </mx:DataGrid>
    </mx:Application>
    Please let me know clearly what's your problem...Do you want to just bind the check box based on XmlList or something else..?
    Thanks,
    Bhasker Chari.S

  • Having problem with change of name in the datagrid Coding

    I am having problem with changing the name of the datagrid header text name for one of the data either in the flash file or the php file.
    The thing is i want to change the Course_Name to Course Name that has no underscore so that it will look nicer in the datagrid but if I change it in the php file like SELECT Course_Name as 'Course Name' ....., it will not turn out in the datagrid when I CTRL ENTER the flash file but the others like Price,description and display is shown.
    There is no problem with my php code but I do not know how to change the Course_Name into Course Name so please help me resolve this error that I am having.
    This is my flash code
      function goCourse(e : MouseEvent):void
      gotoAndStop(5);
      refreshResponder = new Responder (refreshSuccess, onFault);
      connection = new NetConnection ();
      connection.connect (gateway);
      dataDG.addEventListener (Event.CHANGE, gridItemSelected);
      refreshData (true);
      function gridItemSelected (e: Event): void {
      ID = e.target.selectedItem.ID;
      courseTxt.text = e.target.selectedItem.Course_Name;
      priceTxt.text = e.target.selectedItem.Price;
      descTxt.text = e.target.selectedItem.Description;
      private function getParams () {
      var param: Object = new Object ();
      param.ID = ID;
      param.Course_Name = courseTxt.text;
      param.Price = priceTxt.text;
      param.Description = descTxt.text;
      return param;
      private function refreshData (refresh: Boolean): void {
      if (refresh)
      connection.call ("Course.viewCourse", refreshResponder);
      private function refreshSuccess (result: Object): void {
      dataDG.dataProvider = RecordSetDP.toDataProvider (result);
         dataDG.columns = ["Course_Name","Price","Description","Display"];
      private function onFault (fault: Object): void {
      trace (String (fault.description));
    This is my php file code.
      function viewCourse()
      $this->connect();
      $sql = "SELECT Course_Name,Price,Description,Display
      FROM coursetb";
      return mysql_query($sql,$this->_connection);

    i don't see where you're calling your php file in your code, but change 'Course Name' to 'Course_Name' (or vice-versa) there.

  • Problem with datagrid horizontal scrollbar

    Hi all,
    I am facing problem with Datagrid HorizontalScrollBar.
    As per requirement i need to seperate the Horizontal and verticalscroll bars from grid.
    So what i did was, i created HScroll & VScroll components and associated them Datagrid scroll bars. I made HorizontalScrollPolicy and VerticalScrollPolicy "off" for datagrid.
    As i binded values to HScroll & VScroll components which are out side of datagrid, i should be able to scroll datagrid using those components.
    Its working fine for VScroll. When i scroll VScroll component am able to scroll datagrid vertically.
    Problem is with HorizontalScrollPolicy in datagrid, when i change the policy to "on" i can see the scrollbar down to datagrid and able to scroll.  once i change the policy to "off", datagrid columns are getting resized and datagrid width will set back to its container width without scrollbar, because of this there will be no HorizontalBar for datagrid to assiciate with HSCroll Component.
    Code given below:
    [AS]
    private function vScrollGrid(event:ScrollEvent):void
      mainTable.verticalScrollPosition=vScrollBar.scrollPosition;
    private function hScrollGrid(event:ScrollEvent):void
      mainTable.horizontalScrollPosition=hScrollBar.scrollPosition;
    }[/AS]
    [CODE]
    <mx:HBox height="100%" verticalScrollPolicy="off"  horizontalScrollPolicy="off">
            <mx:DataGrid dataProvider="{reportData}"
                 id="mainTable"   
                 height="100%"
                 width="100%"
                 textAlign="right" allowMultipleSelection="true" visible="false" verticalScrollPolicy="off" horizontalScrollPolicy="off"/>
            <mx:VScrollBar id="vScrollBar" height="100%" pageSize="1" scrollPosition="{mainTable.verticalScrollPosition}" maxScrollPosition="{mainTable.maxVerticalScrollPosition}" scroll="vScrollGrid(event)"/>
    </mx:HBox>
    <mx:HScrollBar id="hScrollBar" height="100%" pageSize="1" scrollPosition="{mainTable.horizontalScrollPosition}" maxScrollPosition="{mainTable.maxHorizontalScrollPosition}" scroll="hScrollGrid(event)"/>
    [/CODE]
    Please help me to resolve this
    Thanks & Regards
    Pratap

    1. Try calling setEnabled(true); on the scrollbar
    2. Check that you need to scroll. If efffectively the knob (as the API docs call it) is larger than the scrollbar, it probably won't be shown.

  • Problem Module/datagrid, one time with data, one time is null

    Hello All
    thanks for this discussion place, i have a problem in Flash Builder 4.6 (sdk 4.6.0), construct an application who connect to DB, for now, the CRUD works fine with flex service,
    i have a problem with a datagrid, one time it's worked fine, and another time my obj is null, i cannot understand why.. the fact it's work one time trouble me.. and i have no error in console..
    the target, is to edit a row of datagrid in popup, it's work as you stay in the ModuleClient, but when i launch another Module and come back to ModuleClient, the edit datagrid doesn't work anymore
    i try to put the process here, as the app is large: (say to me if you want more code, i will try to isolate some pieces)
    - click in ModuleMenu and load ModuleClient in ModuleContent
    - dataGrid populate with ArrayCollection
    - double click row in dataGrid (dataGrid_doubleClickHandler(event:MouseEvent))
    - dataGridClients.selectedItem contains effective data
    - push data to ValueObject (ClientObj) already defined in flex services/connected to DB
              var ClientDataGrid:ClientObj = dataGridClients.selectedItem as ClientObj;
    - push data ClientDataGrid to Popup
              in Popup: <valueObjects:ClientObj id="clientObj"/>
    - works fine
    if i select another Module in ModuleMenu, and later relaunch ModuleClient
    - dataGrid populate with ArrayCollection
    - double click row in dataGrid
    - dataGridClients.selectedItem contains effective data
    - push data to ValueObject (ClientObj) already defined in flex services/connected to DB
              var ClientDataGrid:ClientObj = dataGridClients.selectedItem as ClientObj;
    - ClientDataGrid is null
    - cannot push data ClientDataGrid to Popup as ClientDataGrid is null
    - doesn’t work
    <s:DataGrid id="dataGridClients" left="0" right="230" top="66" bottom="10"
    creationComplete="dataGrid_creationCompleteHandler(event)"
    dataProvider="{clientListeSimpleResult.lastResult}"
    doubleClick="dataGrid_doubleClickHandler(event)" doubleClickEnabled="true"
    alternatingRowColors="[#FFFFFF, #f4f3f2]">
    Thanks in advance for any advices/ideas
    i think i make misunderstood of something, im not a flex/flash as3 coder
    so any help would be greatly appreciated
    best regards anyway

    thanks Alex for your link, i read it carrefully, i have to study some thing imo
    but, i don't find solution for now, otherwise, i found a strangely similar problem here : it's seem to be the same problem as i have :
    https://issues.apache.org/jira/browse/FLEX-18680 [After Module reload dataGrid.selectedItem as MyClass NOT WORKING]
    do you think i encounter a bug?
    (i will try to isolate some code to test more)
    thanks again for advices/ideas

  • Problems with DataGrid and WordWrap

    Hi all,
    I have some problem with the headerText property of the
    mx:DataGridColumn, when the text is longer than the column width.
    Even if I set headerWordWrap property to true, sometimes the text
    shown in the header is truncated.
    The behaviour is strange: if you change the column width
    moving the mouse, sometimes the text is truncated and other times
    it isn't.
    Can somebody help me or confirm that it is a Flex bug, please
    thanks
    cheers,
    ennio

    Had you installed Flex 2 Hotfix 1? This fix fixes many bugs
    when columns are resized.

  • Tab with Cellrenderer and Combobox

    When using Cellrenderer to display a combobox in a datagrid, there is an issue with using Tab. If you tab through the cells, it will cause the combobox to erase. To fix this the column needs to be set to non-editable. Problem with doing this is that then you cannot tab to the cell where the combobox is.
    Does anyone know a work-around this?

    Had you RTFA you would have learnt that JTable uses Renderers in the same way you would use a
    rubber stamp... thus each header is NOT a seperate Component, but the same component simply
    used to paint it....
    Following on from this... you may have now what looks very much like an active combo box, this is
    just fooling you. It is merely a ghost of a combo box.. some pixels on the screen, nothing more..
    First and foremost, before running around in desperate circles - RTFA

  • Problem with the MenuBar and how can i delete a own component out of the storage

    Hello,
    I opened this thread in the category "Flex Builder 2", but
    under this category my questions fit better.
    I have a problem with the MenuBar and a question to delete a
    component out of storage.
    1. We have implemented the MenuBar, which was filled
    dynamically with XML data.
    Sporadically it will appear following fault, if we "mousover"
    the root layer.
    RangeError: Error #2006: Der angegebene Index liegt
    außerhalb des zulässigen Bereichs.
    at flash.display::DisplayObjectContainer/addChildAt()
    at mx.managers::SystemManager/
    http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChildAt()
    at mx.managers::SystemManager/addChild()
    at mx.managers::PopUpManager$/addPopUp()
    at mx.controls::Menu/show()
    at mx.controls::MenuBar/::showMenu()
    at mx.controls::MenuBar/::mouseOverHandler()
    Here a abrid ged version of our XML to create the MenuBar:
    <Menuebar>
    <menu label="Artikel">
    <menu label="Artikel anlegen" data="new_article" />
    <menu label="Artikel bearbeiten" data="edit_article" />
    <menu label="Verpackung">
    <menu label="Verpackung anlegen" data="new_package" />
    <menu label="Verpackung bearbeiten" data="edit_package"
    />
    </menu>
    <menu label="Materialgruppe">
    <menu label="Materialgruppe anlegen"
    data="new_materialgroup" />
    <menu label="Materialgruppe bearbeiten"
    data="edit_materialgroup" />
    </menu>
    </menu>
    </Menuebar>
    It is a well-formed XML.
    2. Delete a component out of storage
    We have some own components (basically forms), which will be
    created and shown by an construct e.g.
    var myComponent : T_Component = new T_Component ;
    this.addChild(myComponent)
    Some of our forms will be created in an popup. On every call
    of the popup, we lost 5 mb or more, all childs on the windows will
    be removed by formname.removeAllChild();
    What cann we do, that the garbage collector will dispose this
    objects.
    Is there a way to show all objects with references (NOT
    NULL)?
    I have read in the Flex Help, that
    this.removeChild(myComponent) not delete the form and/or object out
    of the storage.
    Rather the object must be destroyed.
    It is sufficient to call delete(myComponent) about remove
    this object out of the storage as the case may be that the
    garbage-collector remove this object at any time?
    Or how can I destroy a component correctly. What happens with
    the widgets on this component e.g. input fields or datagrids?
    Are they also being deleted?
    Thanks for your help.
    Matze

    If you mena the "photo Library" then you cannot delete it.
    This is how iphone handles photos.  There are not two copies.  There a re simply two places from which to access the same photos.  ALL photos synced to iphone can be accessed via Photo Library.  Those same pics can be accessed via their individual folder.

  • Problem with setCursor for JButton in cell on JTable

    i have a problem with setCursor to JButton that is in a cell of the JTable}
    this is the code
    public class JButtonCellRenderer extends JButton implements TableCellRenderer {
    public JButtonCellRenderer() {
    setOpaque(true);
    public Component getTableCellRendererComponent(JTable table, Object value,
    boolean isSelected, boolean hasFocus,
    int row, int column) {
    if (isSelected) {
    setForeground(table.getSelectionForeground());
    setBackground(table.getSelectionBackground());
    else {
    setForeground(table.getForeground());
    setBackground(Color.WHITE);
    setBorder(null);
    if(table.getValueAt(row,column) == null){
    setText("");
    if(isSelected){
    setBackground(table.getSelectionBackground());
    }else{
    setBackground(Color.WHITE);
    }else{
    if(table.getValueAt(row,column) instanceof JButton){
    JButton _button = (JButton)table.getValueAt(row,column);
    if(_button.getText().trim().equals("")){
    setText("<html>"+ "<font size=\"3\" COLOR=\"#0000FF\"><u><b>Ver...</b></u></font>"+"");
    }else{
    setText("<html>"+ "<font size=\"3\" COLOR=\"#0000FF\"><u><b>" + _button.getText() + "</b></u></font>"+"");
    return this;
    }

    Not quite sure I understand the problem, but I guess you have tried to call setCursor on your renderer and found it didn't work? The reason, I think, is that the renderer only renders a JButton. The thing that ends up in the table is in fact only a "picture" of a JButton, and among other things it won't receive and interact with any events, such as MouseEvents (so it wouldn't know that the cursor should change).
    There are at least two alternatives for you: You can perhaps use a CellEditor instead of a CellRenderer. Or you can add a MouseListener to the table and then use the methods column/rowAtPoint to figure out if the cursor is over your JButton cell and change the cursor yourself if it is.

  • Problem with printing HTML container

    Hi all,
    I am having a problem with FlexPrintJob (or PrintJob) for the
    mx.controls.HTML container. On print i receive only one page (only
    the visible area) of my HTML container. How can i print multiple
    pages from mx.controls.HTML?
    Please Help!!!

    And here we have the problems with Adobe's take on printing.
    It would be much easier for every developer, if they could say
    "HTMLContainer.print()" and have it print all of the text contained
    in the html container, maybe even with integrated use of CSS print
    stylesheets...
    But, for the time being, the easiest method is to break all
    of the text out into a second invisible (alpha = 0 NOT
    visible=false) html container that is sized to the dimensions of
    your page. Then you call addPage, scroll the container exactly 1
    page, and call addPage again, repeating until you reach the end of
    your content. This method of printing is necessary for people
    developing an image builder, that want to make multi-sheet prints.
    But people who are writing RIA's have the need to make multi-sheet
    prints of TEXT that is not in a datagrid on a regular basis. This
    is a SERIOUS limitation, and should have been taken care of prior
    to the release of AIR 1.0

  • Datagrid scrolling problem

    I'm trying to create a contact search/selection component
    that works somewhat like a combobox (more like SuperComboBox
    http://blog.strikefish.com/blog/index.cfm/2008/3/21/Flex-Smart-Combo-aka-look-ahead-combo
    See sample at
    http://www.eval.rmc.psu.edu/dgt/DataGridTest.html
    Source view is enabled.
    Basically, after the user types a few characters of the last
    name, a datagrid (separate component) is popped up and presents a
    list of matching contacts. The component includes view edit add
    buttons, too (which are not active in the included example).
    This all works great except for a couple of problems with the
    popped up datagrid. I've tried both the standard and advanced dg's
    and the both act the same.
    If the number of rows returned exceeds the area of the
    datagrid (12 rows in the example), the datagrid, as expected,
    displays a vertical scroll bar. The scrollbar/datagrid doesn't work
    properly at that point, though. Clicking the down arrow or in the
    scrollbar track or the down arrow DOES NOT scroll the data.
    Grabbing the slider bar and dragging it down DOES scroll the data
    down. However, when I do scroll down using the slider, clicking on
    a row does not fire the itemClick event, and the grid scrolls up to
    the first 12 lines and highlights a row in the first 12 rows. CLICK
    does get fired but always returns a row between 1 and 12.
    Now, ideally, the user is going to type 3 or 4 characters of
    the last name and zero right in on the contact they're looking for
    without the need for scrolling, but there are always the outliers
    like 'Smith' that return a large number hits (the example uses PA
    Legislators offices, so it's not quite representative of the
    end-use data set). Regardless, the datagrid object doesn't appear
    to work correctly when it's a component -- I'm not sure if it's a
    bona fide bug, or the whether it's that the grid is a component,
    contained in a canvas, or being popped up that's the problem. More
    likely, my flex newbie self just doesn't have some vital attribute
    set correctly, or I'm doing something else that's not correct.
    Any insights would be greatly appreciated.
    Thanks,
    want-a-dw
    Sample code included.
    Windows XP SP2
    Flex Builder 3.0.205647
    Same results with these browsers/player versions.
    Firefox 2.0.0.17, Flash Player 9.0.124.0 (and 9.0.115.0)
    IE 6.0.2900.2180, Flash Player 9.0.124.0 (and 9.0.115.0)
    Chrome 0.2.149.30, Flash Player 9.0.124.0

    > That is definitely incorrect behavior.
    > Does this happen in a simple test app? I think I have an
    example I can try with, I will post back what I find.
    Yes. There is an example of the behavior at
    http://www.eval.rmc.psu.edu/dgt/DataGridTest.html
    and source code view is enabled. Thanks for your help.

  • DataGrid Refreshing Problem

    Hi All,
    First let me explain my problem clearly.I am facing the
    problem with refreshing datagrid for add,update,delete operations.
    For adding task(todo app) i am using another mxml
    component(PopUpwindow).when i do add,delete or update, changes are
    happening
    in database pakka and fine.There is no error in that.Only
    problem is when i add or delete or update a task, datagrid has to
    get refresh with the updated or new data.Then only from ui
    user will know that he added a task or deleted a task etc right.
    sometimes it's refreshing fine and sometimes not.If it
    doesn't refresh at all times i can think of my logic.But if it's
    happening sometimes and sometimes not.
    after add or delete or update am using below 5 lines of code
    to refresh datagrid.
    getList.send(); //sending request again to load new data
    using httpservice.
    datagrid.dataProvider = resultList; //resultList is
    bindabale ArrayCollection variable.
    resultList.refresh(); //this line not all giving any
    changes.i think it's not working
    datagrid.validateDisplayList();
    datagrid.validateNow();
    Thnaks & Regards,
    premadas.

    Hey harsha,
    the following code i'm using for deleting a task.
    <mx:HTTPService id="getTodo" url="
    http://dev.edinc.in:8080/poc/ToDo/GetToDo.jsp"
    result="resultHandler(event)"/>
    private function delTask():void
    delTodo.cancel();
    delTodo.send(delData);
    getTodo.send();
    deltaskname.text = "";
    deltaskdate.selectedDate = new Date();
    deltaskcategory.selectedIndex = -1;
    deltaskpriority.selectedIndex = -1;
    deltaskstatus.selectedIndex = -1;
    Anything i need to apply here.
    Thanks & Regards,
    Premdas.

Maybe you are looking for

  • My external hard drive disappeared on Windows 8

    it had worked fine until now.  Windows 8 updated itself today and the external HD is nowhere to be found.  I attached it to another computer and the external drive works fine... all the files were there, accessible and no loss of speed.  So it is def

  • Cheque date should be due date on which invoice are due.

    Dear Experts, We are making payment through F110. Now we are planning to run  Automatic cheque printing two times in a month instead of daily. But cheque date should be due date on which invoice are due. Is it possible to do so, Please advice. Thanks

  • "Send for review" user error

    Contribute 3 Windows A user was supposed to send an edited page for review via e-mail. Instead, they sent it to their whole Contribute group. Unfortunately, they are the only one in that group who still has Contribute. Now she can't edit the page bec

  • Problem with Image loading when using ajax request

    Hi, I am uisng "https://ajax4jsf.dev.java.net/ajax" for ajax in my JSF and my JSP is: <a:outputPanel id="newsPanel"> <div id="newsImage" class="myclass"> <h:graphicImage id="img" url="#{mgr.path}" rendered ="#{(mgr.path != null)}"/> </div> <div class

  • Not showing up online on iChat from my iPhone

    I can send SMS texts to my friend, but I do not come up online on her Buddy List on iChat and it will not let her send an SMS text to me because it says "This person is not online." This has never happened before, and just started yesterday mid conve