How I set the Focus in object

Hello.
I need set the focus on first object in a JInternalFrame.
The form JInternalFrame contain a JTabbedPanel and this include object jFormatedTextFields.
I need when the init form set the focus over first object in the first tab of JTabbedPanel. How I do?.
Than You

works OK in this
(tabbed panes seem to be working OK for focus now, don't know what's changed)
import javax.swing.*;
import java.awt.*;
import  javax.swing.text.*;
class Testing extends JFrame
  MaskFormatter mf;
  JFormattedTextField ftf;
  public Testing()
    setLocation(300,200);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    try{mf = new  MaskFormatter("###.###.##.##");}
    catch(Exception e){e.printStackTrace();}
    ftf = new JFormattedTextField(mf);
    JTabbedPane tp = new JTabbedPane();
    tp.addTab("A",ftf);
    JDesktopPane dp = new JDesktopPane();
    JInternalFrame if1 = new JInternalFrame( "I-F1", true, true, true, true );
    if1.setLocation(50,50);
    if1.getContentPane().add(tp);
    if1.pack();
    if1.setVisible(true);
    dp.add(if1);
    getContentPane().add(dp);
    setSize(400,300);
    setVisible(true);
    ftf.requestFocusInWindow();
  public static void main(String[] args){new Testing();}
}

Similar Messages

  • How to set the focus to a first element in oracle apex 3.2.1  and 3.1.2.00

    Hello ,
    I am using oracle apex 3.2.1 in development env. How to set the focus to a first element of a page.
    thanks/mahesh

    Hi,
    This might help
    http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/bldr_pgs.htm#CJGJDHCI
    Find "Cursor Focus" from page Display Attributes
    Br,Jari

  • How to set the focus on the new added line in ALV list (OO)

    Dear Friends,
    I have an ALV list based on OO(using alv_grid->set_table_for_first_display), when I click the 'new' button to add a new line, the mouse arrow is always pointing to the first line - not the new created line for user to input!!.
    So how to set the focus (mouse arrow) on the new added line in ALV list for user to input it friendly?
    Thanks a lot!!

    Hello,
    To get the selected line row first we have get all the rows in the internal table.
    When u click on the button when it is creating the new line we have to pass the row number to the call method
    CALL METHOD <ref.var. to CL_GUI_ALV_GRID > ->get_selected_rows
       IMPORTING
          ET_INDEX_ROWS  =   <internal table of type LVC_T_ROW > (obsolete)
          ET_ROW_NO      =   <internal table of type LVC_T_ROID > .
    CALL METHOD<ref.var. to CL_GUI_ALV_GRID>->set_selected_rows
       EXPORTING
          IT_ROW_NO  =  <internal table of type LVC_T_ROID>
       or alternatively
       IT_INDEX_ROWS  =  <internal table of type LVC_T_ROW>
          IS_KEEP_OTHER_SELECTIONS  =  <type CHAR01>.
    http://help.sap.com/saphelp_erp2004/helpdata/EN/22/a3f5ecd2fe11d2b467006094192fe3/content.htm

  • How to set the focus to the tabbed pane title?

    Dear Friends,
    I'm using tabbed pane (JTabbedPane) in my application. I have 2 tabbed panes and each contain some text fields and buttons.
    In first tabbed, I have 2 text fields, OK and Cancel buttons. I have to set the focus to the title of the tabbed pane after it lost focus from the Cancel button (focus has to move from Cancel button to tabbed pane title by pressing tab key).
    Could anyone please tell me how to set the focus to the tabbed pane title?
    Thanks in advance,
    Sathish kumar D

    Thanks for your reply.
    Could you please tell me how to set focus for title of the tabbed pane throug FocusTraversalPolicy?
    because usually we set the focus for the component by requestFocusInWindow().
    for example set focust to the button OK,
    btnOk.requestFocusInWindow()likewise could you tell me how to set focus to Title of the tabbed pane?
    Sathish kumar D

  • Can someone explain how to set the focus to a component

    Hello,
    What is the best way to ensure that a component gets the focus with code. I have tried requestFocus and requestFocusInWindow and none of them seems to do there work. The frame containing the components that should get the focus is displayed, the component is focusable so that is not the problem. What I found out is that if the component is deep in a nesting of panes (where the top pane is in the frame) is that calling requestFocus or requestFocusInWindow does not give the component where this focus is called on the focus but either the pane that contains it, one of the parent panes of this pane or one of the components in these panes, in almost all cases the component requesting the focus does not get the focus at all. I always have to write a work around in defining a focus listener for all these panes that transfer the focus back to the component that requested the focus originally, I can't believe that this is the way to ensure that a component has the focus via code. I have searched for documentation but found nothing on what requestFocus(inWindow) is actually dooing (a lot about focus traversibility but I don't want to control this, just make sure that a component gets the focus).
    Again I'm pretty sure that the toplevel window is activated and that the component that requested the focus is focusable (I had created a derived version of the DefaultFocusManager that showed who has focus). Personally I think (and I'm not alone if you do a search in this forum on focus management) that there is either a big problem in the documentation of focus management or that it is still not possible to even try to set the focus on a component in a easy way.
    Marc

    Hello,
    thanks for your reply, here is some example code that illustrates the problem I have (the actual code is to big to show here, which is the raison why I did not posted it here). The code wil create a frame with a JPanel with a JTextField, a 'New' Jbutton and a 'Delete' Jbutton, a tabbed pane in the center ('New' will create a new JPanel, add it to the tabbed pane and set the focus on it, either by calling RequestFocusInWindow() directly or by calling it via InvokeLater (someone on this forum suggested to use this). I changed also the focusmanager to show the component that has the focus when you type something. To test compile and run the program (either with a call to requesteFocusInWindow directly or indirectly (by changing the comments), on my system I get the following behaviour:
    1. requestFocusInWindow called directly
    Start program en type, the tabbed pane has the focus
    Press New and type something, a button has the focus not the created panel
    Press New again and type something, a button has the focus not the created panel
    2. requestFocusInWindow be called indirectly
    Start program and type, the tabbed pane has the focus
    Press New and type, the created panel has the focus (I thought at one moment that I had found the solution there, but alas ...)
    Press New again and type something, a button has again the focus.
    Note that with my real program it is not always a button that will have the focus, sometimes it is a combobox or a TextField (I tried to get this with the example code (the JTextField) but did not succeed.
    Hopes this clarify the problem a little bid, what I want is when the window is visible to set focus on newly created panes (or in the real program on the panel that is selected via the tabbed pane or via a key combination to shift the focus between the panels) but requestFocusInWindow seems to behave unpredicatable. I can't imagine that what I see is a bug so I must make some assumptions which are not valid but I don't see them, btw listening on the WindowListener is I think not the solution because the frame is already displayed when I want to set the focus and I do not use a modal dialog box.
    The example code follows here
    Marc
    * Main.java
    * Created on December 21, 2004, 8:58 AM
    package testfocus;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    * @author marc
    public class Main
    static int counter;
    /** Creates a new instance of Main */
    public Main()
    * @param args the command line arguments
    public static void main(String[] args)
    JFrame frm=new JFrame();
    JPanel content=new JPanel();
    frm.setContentPane(content);
    final JTabbedPane paneContainer=new JTabbedPane();
    JPanel bar=new JPanel();
    JButton create=new JButton(new AbstractAction("New")
    public void actionPerformed(ActionEvent ev)
    counter++;
    final JPanel pnl=new JPanel();
    pnl.setName("test"+counter);
    paneContainer.add(pnl);
    pnl.setFocusable(true);
    pnl.requestFocusInWindow();
    /* Either use this or the previous line
    SwingUtilities.invokeLater(new Runnable()
    public void run()
    pnl.requestFocusInWindow();
    JButton delete=new JButton(new AbstractAction("Delete")
    public void actionPerformed(ActionEvent ev)
    int i=paneContainer.getComponentCount()-1;
    if (i>=0)
    paneContainer.remove(i);
    JTextField dummy=new JTextField("Test");
    bar.add(dummy);
    bar.add(create);
    bar.add(delete);
    content.setLayout(new BorderLayout());
    content.add(bar,BorderLayout.SOUTH);
    content.add(paneContainer,BorderLayout.CENTER);
    frm.setSize(300,400);
    FocusManager.setCurrentManager(new DefaultFocusManager()
    public void processKeyEvent(Component component,KeyEvent ev)
    System.out.println("Focus owner"+getFocusOwner());
    super.processKeyEvent(component,ev);
    frm.setVisible(true);
    }

  • How to get the focus in a Table Control

    Hello Experts,
                         I have a simple Table control in my screen . I want to know under which column my cursor is ? Basically i want to get the focus the table control . How can i achieve this  ?
    Thanks
    Vivek

    >
    Vivek Joshi wrote:
    > Hello Router ,
    >                      I do not want to set the focus , I want to get focus . User can click on any cell in the table and then press a button in the toolbar . Now in the event handler of the button i want to under which column User has set the focus .
    > I hope , I am clear now .
    > Thanks for your help
    > Regards
    > Vivek
    An yet you keep getting suggestions of how to set the focus.   I looked through the API documentation and I don't see anything that would suggest you can request to see where the current focus is.  Perhaps someone might still come along with a solution, but my hopes wouldn't be too high at this point.  I can pass the requirement onto Product Definition, as the use case does seem interesting.  Perhaps it is something we have even considered in the past. 
    But for now, there might be a better way to solve your problem.  It will probably mean redesign the interaction.  What exactly are your requirements?  Do you need to be able to get the data in a particular cell of table when a button is clicked?  Just throwing out some ideas here, but maybe just use the lead selection to select the row, but then have a button choice to choose the action associated with the column you want. A hack for sure - but it might work.  Also it doesn't help you right now, but in the near future update to NetWeaver 7.0, WDA does have a onColSelect event for the table.

  • How can I set the focus to a field on a Portal form?

    Can anyone tell me if it is possible to set the focus to a particular field on a form which was created in Portal and is based on a PL/SQL procedure?
    The form contains a mixture of field types and also takes parameters from another form and displyas them.
    I have managed to set the focus on a form which is defined dirdctly in a PL/SQL procedure, using Javascript, but this doesn't seem to work for a Portal form.

    Hi,
    look at the discussion on May 25:th 2001, subject "How to get the cursor into a specific field", it might give you an idea.
    To give you some hint right now:
    In the "Additional PL/SQL Code" tab, "Before displaying the page", add following code:
    htp.p('<BODY onLoad="document.forms[0].elements[6].focus();">');
    forms[0] if you only have 1 form, and elements[the number of the item you want to be in focus]
    I hope this could help you
    /Sara

  • How to set the Default values for Info Objects in Data Selection of InfoPac

    Hi All,
    Flat file Extracion:
    How to set the Default values for Info Objects in Data Selection Tab  for Info Package
    ex: Fiscal Year Variant  Info Object having values 'K4' 'Y2' etc  in Flat file
    Initially  default value(not constant)  for this info Object value should be 'K4'  in Info Package
    If I set data selection value for this info object K4 it will retreive records with this selection only? how to handle
    Rgds,
    CV

    Hi,
    suppose as your ex. if you are having fiscalyear variant in the dataselection tab then specify K4 in the from column, again the ficalyearvariant row and click on insert duplicate row at the bottom . you will get another row . In that enter Y2 in the from column. now you can extract K4, y2 values .
    haritha

  • How to set the selectedIndex when dataProvider is an XML object in DropDownList?

    dataProvider was an XML object
    How to set the selectedIndex when dataProvider is an XML object in DropDownList?
    I do this:
    <s:DropDownList id="dropDownList" requireSelection="true" selectedIndex="2"
                    labelField="lastName" dataProvider="{employeeService.lastResult.employees.employee}"/>
    But always the first item is selected whatever the value of selectedIndex equals to.

    if i understand correctly, you want the selectedindex to be 2 when the DropDownList  displays.
    It might be the case that the dataprovider is being sought after it's already selected its index (as the dataprovider isn't already determined to begin with), so currently it's
         - setting the selected index to default
         - setting the selected index to 2 (your command)
         - getting the dataprovider
         - setting the selected index to default
    try writing a function to set the DropDownList's selected index after it's received the information, or even just attach it to the employeeService result handler.
    for quick testing sake you could just add
    <s:DropDownList id="dropDownList" requireSelection="true" updateComplete="dropDownList.selectedIndex = 2"
                    labelField="lastName" dataProvider="{employeeService.lastResult.employees.employee}"/>
    to see if my theory is correct.

  • How to set the default focus to  a particular jtextfield

    hi,
    i'm trying to set the focus to the specified Jtextfield by default.
    i tried with reqestFocus() method,grabFocus() method,getCursor() method
    but all in vain.
    can anyone suggest me a solution please.
    very urgent request please
    thanks in advance
    regards
    Ravi teja

    If I understand the question correctly then this thread will help:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=290339

  • How can I set the Focus on af:inputText

    Hi,
    I write the javascript for email validation and I import it in my jspx page and using client listner i want to invok the function in that javascript using onBlur event.if i put a single field it wil validat but if i using 2 or more the it wil nt wrk..Thnz in adv.

    I have problem that fragments Pages and Javascript,
    I have two inputText,how to make the focus of the first pass to the second box?
    I work with fragment pages (.jsff) where to put the javascript code? and how invoke this code?
    Thanks.

  • How to set the background for all components?

    hi
    Does anybody know how to set the DEFAULT background color in an application.. I need it because in jdk 1.3 the default bgcolor is grey and in 1.5 it is white.. and I wish white as well.. so to make it also white in jdk 1.3 I need to use the (a bit annoying) anyContainer.setBackground( Color.white ); and these are lots in my app.. So my question is: is there such an overall class with a function (say UIManager.setComponentsBackground( Color color ) ) for such a purpose?
    any tip or link would be greatly appreciated

    Does anybody know how to set the DEFAULT background color in an applicationthis might get you close
    import java.awt.*;
    import javax.swing.*;
    import java.util.Enumeration;
    class ApplicationColor extends JFrame
      public ApplicationColor()
        setApplicationColor(Color.RED);
        setLocation(400,300);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        JPanel jp = new JPanel(new BorderLayout());
        jp.add(new JTextField("I'm a textfield"),BorderLayout.NORTH);
        jp.add(new JComboBox(new String[]{"abc","123"}),BorderLayout.CENTER);
        jp.add(new JButton("I'm a button"),BorderLayout.SOUTH);
        getContentPane().add(jp);
        pack();
      public void setApplicationColor(Color color)
        Enumeration enum = UIManager.getDefaults().keys();
        while(enum.hasMoreElements())
          Object key = enum.nextElement();
          Object value = UIManager.get(key);
          if (value instanceof Color)
            if(((String)key).indexOf("background") > -1)
              UIManager.put(key, color);
      public static void main(String[] args){new ApplicationColor().setVisible(true);}
    }

  • How to set the parameter

    hi i am creating xml publisher and from OAF with parameters
    cusname:
    runreportdate:
    go clear buttons
    click go open report in pdf
    SELECT hp.party_name CustomerName,
      csi.incident_number SRNumber,
      to_char(csi.incident_date,'DD-MON-YYYY') SRDate,
      to_char(csi.close_date,'DD-MON-YYYY') SRCloseDate,
      mtl.description SRItemName,
      csi.summary Summary,
      csi.problem_code,
      csi.incident_address SRAddress,
      csi.INCIDENT_COUNTRY SRCountry,
      '31-DEC-2008' Reportrundate,
      COUNT ( * ) over () cnt,
      cis.name,
      COUNT(
      CASE
        WHEN cis.name='Low'
        THEN 1
      END) over () Low,
      COUNT(
      CASE
        WHEN cis.name='Medium'
        THEN 1
      END) over () Medium,
      COUNT(
      CASE
        WHEN cis.name='High'
        THEN 1
      END) over () High1,
    to_char(csi.incident_date,'MON-YYYY') SrMonth
    FROM hz_parties hp,
      hz_cust_accounts hca,
      hz_contact_points hc,
      cs_incidents_all_b csi,
      ar_lookups arl,
      cs_incident_severities_b cis,
      mtl_system_items_kfv mtl
    WHERE hca.cust_account_id   =csi.account_id
    AND hp.party_type          IN ('PERSON','ORGANIZATION')
    AND hp.status               ='A'
    AND hp.party_id             = hca.party_id
    AND hca.status              ='A'
    AND hp.party_id             =hc.owner_table_id(+)
    AND hc.owner_table_name(+)  ='HZ_PARTIES'
    AND hp.party_id             =hca.cust_account_id
    AND hc.contact_point_type(+)='PHONE'
    AND hc.primary_flag(+)      ='Y'
    AND hc.status(+)            ='A'
    AND arl.lookup_type(+)      = 'PHONE_LINE_TYPE'
    AND arl.lookup_code(+)      = hc.phone_line_type
    AND hp.party_name='Business World'
    AND csi.incident_date BETWEEN to_date('01-JAN-2000','DD-MON-YYYY') AND to_date('31-DEC-2008','DD-MON-YYYY')
    AND cis.incident_severity_id=csi.incident_severity_id
    AND mtl.inventory_item_id=csi.inventory_item_id
    GROUP BY hp.party_name,
      csi.incident_number,
      csi.incident_date,
      csi.close_date,
      csi.summary,
      csi.problem_code,
      csi.incident_address,
      cis.name,
      csi.INCIDENT_COUNTRY,
      mtl.description,
      to_char(csi.incident_date,'MON-YYYY')
    Am code
        public void initQuery(String paramString1, String paramString2)
              SrReportVOImpl vo=getSrReportVO1();
            if ((paramString1 != null) && (!("".equals(paramString1.trim()))) && (paramString2 != null) && (!("".equals(paramString2.trim()))))
              vo.setWhereClauseParams(null);
              vo.setWhereClauseParam(0, paramString1);
              vo.setWhereClauseParam(1, paramString2);
              vo.executeQuery();
        public XMLNode getPrintDataXML()
        //SrReportVOImpl vo=getSrReportVO1();
        OAViewObject vo = (OAViewObject)findViewObject("SrReportVO1");
        //vo.initQuery(s,s1);
        XMLNode xmlNode=(XMLNode) vo.writeXML(4,XMLInterface.XML_OPT_ALL_ROWS);
            return xmlNode;
    CO code
          SrAMImpl am=(SrAMImpl)pageContext.getApplicationModule(webBean);
          if(pageContext.getParameter("Go")!=null)
              //am.searchSrDetails(pageContext,webBean);   
               String s=pageContext.getParameter("CustomerName");
               String s1=pageContext.getParameter("RunReportDate");
                   am.initQuery(s,s1);
                 // Get the HttpServletResponse object from the PageContext. The report output is written to HttpServletResponse.
                 DataObject sessionDictionary = (DataObject)pageContext.getNamedDataObject("_SessionParameters");
                 HttpServletResponse response = (HttpServletResponse)sessionDictionary.selectValue(null,"HttpServletResponse");
                 try {
                 ServletOutputStream os = response.getOutputStream();
                 // Set the Output Report File Name and Content Type
                 String contentDisposition ="attachment;filename=ServiceReport.pdf";
                 response.setHeader("Content-Disposition",contentDisposition);
                 response.setContentType("application/pdf");
                     Serializable param[]={pageContext.getParameter("CustomerName"),pageContext.getParameter("RunReportDate")};
                     System.out.println("hiiii 12");
                     // Get the Data XML Output as the XMLNode
                     XMLNode xmlNode = (XMLNode) am.invokeMethod("getPrintDataXML",param);
                     System.out.println("hiiii 13");
                     System.out.println(xmlNode.toString());
                     System.out.println("hiiii 14");
                 // Get the Data XML File as the XMLNode
                 ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
                 xmlNode.print(outputStream);
                 ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
                 ByteArrayOutputStream pdfFile = new ByteArrayOutputStream();
                 //Generate the PDF Report.
                 TemplateHelper.processTemplate(
                 ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getAppsContext(),
                 APP_NAME,
                 TEMPLATE_CODE,
                 ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getLanguage(),
                 ((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getCountry(),
                 inputStream,
                 TemplateHelper.OUTPUT_TYPE_PDF,
                 null,
                 pdfFile);
                 // Write the PDF Report to the HttpServletResponse object and flush.
                 byte[] b = pdfFile.toByteArray();
                 response.setContentLength(b.length);
                 os.write(b, 0, b.length);
                 os.flush();
                 os.close();
                 pdfFile.flush();
                 pdfFile.close();
                 catch(Exception e)
                 response.setContentType("text/html");
                 throw new OAException(e.getMessage(), OAException.ERROR);
                 pageContext.setDocumentRendered(false);
                   System.out.println("hiiii 13");
          if(pageContext.getParameter("Clear")!=null)
              am.ClearFields(pageContext,webBean);
          }can any one tell me how to set the bind parameters or setting parameter

    Hi,
    Could not understand your problem exactly. DId you try adding bind variables in the query like below:
    AND hp.party_name='Business World'
    AND csi.incident_date BETWEEN to_date('01-JAN-2000','DD-MON-YYYY') AND to_date('31-DEC-2008','DD-MON-YYYY')
    change to
    AND hp.party_name=:1
    AND csi.incident_date BETWEEN :2 AND :3
    Please note you will need three bind variables. Second and third for SR Dates.
    ~Amol

  • Hi, I am using Indesign CS6, How to set the page size in Inches.

    Hi, I am using Indesign CS6, How to set the page size in Inches.

    All fields in InDesign can be entered in any measurement system. So, if you want to make an 8"x10" document and go to File>New Document and the window looks like this:
    …you can type either 8 in or 8" into the Width field like this:
    …and when you move to the next field, it will convert the eight inches into the equivalent number in the unit of measure that it is using at the moment, like this:
    … (203.2 milimeters is the same as 8 inches). You can also enter a different measurement unit into other fields once the file is created, such as the width or height of a frame, or the position of an object in the X and Y coordinates.
    If you would rather just work in inches instead of having to type the inches mark or abbreviation, go to InDesign>Preferences>General and select the Units & Increments tab. There you will see Ruler Units for Horizontal and Vertical at the top of the window. Set them to Inches and all of the fields will display in inches. If you do that to an open document, you will change the unit of measure for that document. If you do it while no documents are open, it will change the unit of measure for any new documents you create. To change the unit of measure for existing documents, you will have to open each and make the change.

  • How to set the width of DataGridColumn dynamically?

    What I want to do is, load data from a text file and put into a DataGrid component, the fields of ech record in the text have fixed length, and are seperated by a space, like this:
    personal.txt
    50 Uvwxyz  Male    123456789
    60 Hijklmn  Male    67890123456789
    30 Abcdefg Male    123456789012345
    40 Opqrst   Female 987654321012345678
    the configuration file is column.xml:
    <dgcolumn>
         <personal>
              <len>20</len>
              <title>Name</title>
         </personal>
         <personal>
              <len>3</len>
              <title>Age</title>
         </personal>
         <personal>
              <len>6</len>
              <title>Sex</title>
         </personal>
         <personal>
              <len>20</len>
              <title>IdNumber</title>
         </personal>
    </dgcolumn>
    First I load the column.xml into an arrColumn, then read the personal.txt and seperate the record by the width( "len" in the xml file ), and put the seperated fields into another arrField, set the arrayFld as the dataProvider of a DataGrid, thus, the title can be showed as the headerText of the DataGrid and the data can be loaded correctly.
    private function handleComplete( event:Event ):void
         var arrField:Array = new Array();
         var arrFile:Array = loader.data.split(/\n/);
         for( var i:int = 0; i < arrColumn.length; i ++ )
              arrField[i] = convIcom( arrFile[i] );
         adgFile.dataProvider = arrField;
         trace( "The data has successfully loaded" );
    private function convIcom( strRecord:String ):Object
         var key:String = null;
         var dataField:String = null;
         var offset:int = 0;
         var obj:Object = new Object();
         if( strRecord.length > 0 )
              for( var i:int = 0; i < arrColumn.length; i ++ )
                   dataField = strRecord.substr( offset, arrColumn[i].len );
                   key = arrColumn[i].title;
                   obj[key] = dataField;
                   offset += arrColumn[i].len + 1;
         return obj;
    <mx:DataGrid x="10" y="100" width="400" id="dgFile" />
    The problem is, the width of the DataGridColumn is average, how to set the column width by the length of each field? I can calculate the rate of each field ( field / fields ), but I don't know how to change the property of the DataGridColumn.width.
    Thanks for helping.

    In the above post, I pasted an old version of personal.txt, so I paste it again:
    personal.txt
    Uvwxyz  50 Male   123456789
    Hijklmn 60 Male   67890123456789
    Opqrst  40 Female 987654321012345678
    Abcdefg 30 Male   123456789012345
    And I have another question, when the data is loaded into the DataGrid, the fields of each record are ordered in alphabetical order ( the "Age" column will appear firstly, then "IdNumber", "Name", "Sex" ), not as the order in column.xml, how to make it keep the sequence of the xml file?
    Thanks again.

Maybe you are looking for

  • SAX parser for PL/SQL

    For a long time on technet the PL/SQL parser release notes have said that they will be supporting SAX in a future release. Is there any idea of when this support may materialize? Or is Java the only option for a parser in the db for the near future t

  • Import Output Modules to render slaves with expired trial

    Hello, I intend to launch network render jobs through the command line in Windows 7, ie., not with Watch Folder feature but by passing command lines directly to aerender.exe. The problem is that I need to create new Output Module settings for the ren

  • Installing custom shapes in PSE 7

    I have some .csh files I used when I had PSE 4 and have just upgraded. I've been able to successfully edit the meta data files and install layer styles but can't figure out how to access the custom shapes files. I had expected to click on the double

  • Program without inner join..

    hi frds... i need help in the programming without using the inner join and views, i want to take  data from 2  different table without join and views, give some sample codes or links it will help to us. by pari.. Edited by: Alvaro Tejada Galindo on F

  • Size difference for expdp estimate and from data dictionaries

    Hello We have one large table with around 70 million rows and when we check size of this table using query as below select sum(bytes)/1024/1024/1024 "size in GB" from user_segments where segment_name='MYTABLE'; we got expected size 17GB. However, whe