Check Box in Tree Control

I found that the oracle installation is using tree control with check box. I tried to use the same feature in my application. But I found that the tree control in swing and infoswing is not having the feature to add checkbox in the tree control. If anybody knows how to add checkbox in the tree control using the jdeveloper please help me.

You can see how to do it the next link http://www2.gol.com/users/tame/swing/examples/JTreeExamples2.html
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by S. Arun ([email protected]):
I found that the oracle installation is using tree control with check box. I tried to use the same feature in my application. But I found that the tree control in swing and infoswing is not having the feature to add checkbox in the tree control. If anybody knows how to add checkbox in the tree control using the jdeveloper please help me.<HR></BLOCKQUOTE>
null

Similar Messages

  • How to add check box in table control?

    Dear frnds,
    In our requirement i am used tablec ontrol for dialog programming, but i am confused about addition of check box as fields in table control.
    Any help are welcome from your side.

    Hi,
    Chk this demo program: DEMO_DYNPRO_TABCONT_LOOP_AT
    & RSDEMO02.
    Another way:
    Go to the edit mode of the screen select the table control column you want to make it as check box and follow the menu EDIT->CONVERT->check box.
    (make sure that column definition in itab/ddtab is of size 1 char)
    Also chek out this link:
    Add Check box in Table control
    Hope these help you.
    Regards,
    Anjali

  • How to display check box in atable control

    hi
    here is my requirement
    how can i display check box in table control and also when i check that check box it has to dispaly one pop up screen with the records of table control row
    points will be rewarded
    Thanks&Regards
    Nagesh.Paruchuri

    Hi,
    See this code for how to display check box in atable control
    *---- Table declaration.
    TABLES: KNA1.
    CONTROLS TC1 TYPE TABLEVIEW USING SCREEN 200.
    CONTROLS TC2 TYPE TABLEVIEW USING SCREEN 300.
    *---- Data declaration.
    DATA:OKCODE LIKE SY-UCOMM.
    DATA:V_KNA1 LIKE KNA1.
    *DATA:ERROR TYPE C.
    *---- Internal Table declaration.
    DATA:BEGIN OF IT_TAB OCCURS 0,
          CHK,
          VBELN TYPE VBELN_VA,
          KUNNR TYPE KUNAG,
          ERDAT TYPE ERDAT,
          AUDAT TYPE AUDAT,
          VBTYP TYPE VBTYP,
         END OF IT_TAB.
    DATA:BEGIN OF IT_TAB1 OCCURS 0,
          VBELN TYPE VBELN_VA,
          POSNR TYPE POSNR_VA,
          MATNR TYPE MATNR,
          MATWA TYPE MATWA,
          PMATN TYPE PMATN,
         END OF IT_TAB1.
    *&      Module  USER_COMMAND_0100  INPUT
    MODULE USER_COMMAND_0100 INPUT.
      OKCODE = SY-UCOMM.
      CASE OKCODE.
        WHEN 'DISP' OR SPACE.
          SELECT *
             FROM VBAK
             INTO  CORRESPONDING FIELDS OF TABLE IT_TAB
             WHERE KUNNR = KNA1-KUNNR.
          IF SY-SUBRC <> 0.
            MESSAGE 'No sales document exists'(001) TYPE 'I'.
          ENDIF.
          LEAVE TO SCREEN 200.
          CLEAR OKCODE.
    *--- To leave Transaction
        WHEN 'BACK' .
          LEAVE PROGRAM.
          CLEAR OKCODE.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  validate_kunnr  INPUT
    MODULE VALIDATE_KUNNR INPUT.
      V_KNA1 = KNA1.
      SELECT SINGLE *
        FROM KNA1
       WHERE KUNNR = KNA1-KUNNR.
    *-----Process error condition
      IF SY-SUBRC <> 0.
        CLEAR KNA1.
        KNA1-KUNNR = V_KNA1-KUNNR.
        CASE OKCODE..
          WHEN 'BACK' OR 'EXIT' .
            LEAVE PROGRAM.
        ENDCASE.
        MESSAGE 'Customer Does Not Exist'(002) TYPE 'I'.
        LEAVE TO SCREEN 100.
      ENDIF.
    ENDMODULE.                 " validate_kunnr  INPUT
    *&      Module  STATUS_0100  OUTPUT
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'PF'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0200  INPUT
    MODULE USER_COMMAND_0200 INPUT.
      CASE OKCODE.
        WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          LEAVE TO SCREEN 100.
          CLEAR OKCODE.
          CLEAR IT_TAB1.
        WHEN 'DISP' .
          CLEAR OKCODE.
          READ TABLE IT_TAB WITH KEY CHK = 'X'.  
       IF SY-SUBRC = 0.
            SELECT  VBELN   POSNR  MATNR MATWA PMATN
         FROM VBAP
         INTO  TABLE IT_TAB1
         WHERE VBELN = IT_TAB-VBELN.
            IF SY-SUBRC = 0.
              SORT IT_TAB.
              DESCRIBE TABLE IT_TAB LINES TC1-LINES.
              LEAVE TO SCREEN 300.
            ELSE.
              MESSAGE E016(YBHV).
            ENDIF.
          ELSE.
            MESSAGE 'Please select one record' TYPE 'I'.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0200  INPUT
    *&      Module  STATUS_0200  OUTPUT
    MODULE STATUS_0200 OUTPUT.
      SET PF-STATUS 'PF3'.
    ENDMODULE.                 " STATUS_0200  OUTPUT
    *&      Module  USER_C.OMMAND_0300  INPUT
          text
    MODULE USER_COMMAND_0300 INPUT.
      SET PF-STATUS 'PF3'.
      CASE OKCODE.
        WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          CLEAR OKCODE.
          LEAVE TO SCREEN 200.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0300  INPUT
    *&      Module  modify  INPUT
    MODULE MODIFY INPUT.
      MODIFY IT_TAB INDEX TC1-CURRENT_LINE.
    ENDMODULE.                 " modify  INPUT
    *&      Module  okcode  OUTPUT
          text
    MODULE OKCODE OUTPUT.
      CLEAR OKCODE.
    ENDMODULE.                 " okcode  OUTPUT
    Reward Pointsa If usefull
    Regards
    Fareedas

  • HT201077 Photos check box on iCloud control panel

    Photos check box on iCloud control panel does not alow me to check box. Windows 7 laptop. Can you help?

    uninstall the control panel and redownload it from apple.com

  • Check boxes inside tree

    Is it possible to add check boxes inside Tree as elements. Can anyone please provide some sample code for that?

    Hi,
    Unfortunatly all is correct in your code, except data. CheckBox should know when it should be checked and when not. and what should be chnged when you click on it. It's only show data. For changing data you showl add logic to handle click event on CheckBox.
    <mx:XML id="dgData">
    <root>
    <item col1="1" col2="sdf"/>
    <item col1="0" col2="sdfa"/>
    <item col1="0" col="wer"/>
    <item col1="1" col2="dgh"/>
    </root>
    </mx:XML>
    <mx:DataGrid x="171" y="137" editable="true" dataProvider="{dgData.*}">
    <mx:columns>
    <mx:DataGridColumn headerText="Column 1" dataField="col1">
    <mx:itemRenderer>
    <mx:Component>
    <mx:CheckBox selected="{data.@col1 == '1'}"/>
    </mx:Component>
    </mx:itemRenderer>
    </mx:DataGridColumn>
    <mx:DataGridColumn headerText="Column 2" dataField="col2"/>
    <mx:DataGridColumn headerText="Column 3" dataField="col3"/>
    </mx:columns>
    </mx:DataGrid>

  • Check Box in Tree (tree multiple selection)

    I need to create a 2 level hierarchy tree, where the user is allowed to make multiple selection on leaf node. One way is to use TableTree (TreeByNestingTableColumn), but with this I am unable to get the same look and feel of a simple Tree view.
    My questions are:
    1. Is there a way to enable multiple selection on a simple Tree?
    2. If the answer to question 1 is no, then is there a way to add check boxes to the Tree elements (be it parent or leaf)?
    3. Is there anything that can be done to solve this issue without using TableTree?
    Thanks in advance.

    Hi,
    Please go through Multiselection in Tree control thread.
    The solution outline is like this:
    1. When you click on a leaf, you mark it as selected and you can also store it in the context.
    2. Click as many leaves as you like and the onAction will mark each of them as selected.
    3. There's no need to do a CTRL+click, only normal clicks.
    4. Once done you can find out all the marked leaves.
    Regards,
    Satyajit.

  • Check box in Tree ui element.

    Hi All
    I am using org.eclipse.swt.widgets.TreeItem for creating tree structure. Now I am trying to incorporate check box for last tree element. For example if I am preparing tree structure for files the check box should appear only for text file not for directory. User would select the file by checking the box. Here is my code..
    for (int i = 0; i < files.length; i++) {
    TreeItem item2 = new TreeItem(item1, 0);
    item2.setText(files.getName());
    item2.setData(files[i]);
    if (!files[i].isDirectory())
    //here i have to do some thing so that i can select the file in check box
    if (files[i].isDirectory()) {
    new TreeItem(item2, 0);
    I cant use java script here. So pls help me out without using js.
    Thanks a lot.
    Sunit

    in oninputprocessing use the following code to read all the form field values
    data: fields type tihttpnvp,
            field  type ihttpnvp.
    call method request->get_form_fields
      changing
        fields = fields.

  • Check box in table control

    Hi,
    Is it possible to trigger an event by checking the check box in a table control ,
    so that i can use it to activate/ inactivate any field in the same table control ?
    anoop

    with check box alone you cannot trigger an event. You need to use a button also. All you can do is to trigger one event when the check box is checked and another event when the check box is not triggered.
    regards,
    srinivas
    <b>*reward for useful answers*</b>

  • Check Box in Tree View

    I have created ALV TREE VIEW using CL_GUI_ALV_TREE.
    i have set the check boxes at nodes.
    now whenever user checks the checkbox and selects the pushbutton on PF-Status..at that time i want to capture the checkbox in my internal table...
    please fine me a solution.
    Thanks.

    Following code is to add checkboxes in ALV tree:
    FORM add_root_request USING pls_data_ TYPE csg_gs_outtab_p_key__l_is_sub_node_ TYPE c
    CHANGING pl_carrid_key._node = nodes->add_node( related_node = p_key
    relationship = cl_gui_column_tree=>relat_last_child ).
    ... §0.2 if information should be displayed at
    the hierarchy column set the carrid as text for this node
    text = p_ls_data-object.
    node->set_text( text ).
    ... §0.3 set the data for the nes node
    node->set_data_row( p_ls_data ).
    item = node->get_hierarchy_item( ).
    item = node->get_item( 'FCHECKBOX' ). "FCHECKBOX is my radio button field in internal table which I am using to populate the ALV
    item->set_type( if_salv_c_item_type=>checkbox ).
    pl_carrid_key = node->get_key( )._
    CATCH cx_salv_msg.
    ENDFORM_._Following code is for handling checbox_change event
    PERFORM application_action_events.
    FORM application_action_events .
    data: lr_events type ref to cl_salv_events_tree.
    *data gr_events type ref to lcl_handle_events.
    lr_events = gr_tree->get_event( ).
    create object gr_events.
    set handler gr_events->check for lr_events.
    set handler gr_events->on_link_click for lr_events.
    set handler gr_events->on_before_user_command for lr_events.
    set handler gr_events->on_after_user_command for lr_events.
    set handler gr_events->on_keypress for lr_events.
    endform. " application_action_events----
    CLASS lcl_handle_events DEFINITION.
    PUBLIC SECTION.
    METHODS:
    check FOR EVENT checkbox_change OF cl_salv_events_tree IMPORTING node_key columnname checked. "Here node_key is the row number
    ENDCLASS. "lcl_handle_events DEFINITION
    CLASS lcl_handle_events IMPLEMENTATION
    §4.2 implement the events for handling the events of cl_salv_table
    CLASS lcl_handle_events IMPLEMENTATION_._
    METHOD check_._
    WRITE 'hello'_._
    DATA lwa_modify_check_ TYPE REF TO csg_gs_outtab.
    node_key = node_key - 1_._
    READ TABLE csg_gt_list INDEX node_key REFERENCE INTO lwa_modify_check._
    if columnname = 'FCHECKBOX'_._
    IF checked = 'X'_._
    If the value in internal table is set to X, then it is deselct
    lwa_modify_check->fcheckbox =_ ' '_._
    ELSE_._
    lwa_modify_check->fcheckbox =_ 'X'_._
    ENDIF_._
    ENDIF_._
    if columnname = 'CHECKBOX_READ'_._
    IF checked = 'X'_._
    If the value in internal table is set to X, then it is deselct
    lwa_modify_check->checkbox_read =_ ' '_._
    ELSE_._
    lwa_modify_check->checkbox_read =_ 'X'_._
    ENDIF_._
    ENDIF_._
    *MODIFY TABLE csg_gt_list from l_wa_modify_check.
    flag_test = flag_test + 1_._
    ENDMETHOD_._ "check
    ENDCLASS_._ "lcl_handle_events IMPLEMENTATION
    Please give me reward points

  • Table Control Check Box

    Hi,
    i am Displaying a table control in module pool programming
    i need to have check boxes for each item in the table control.
    Regards,
    Vijaya

    HI,
    Refer to the link.
    how to create a check box in table control
    This may help.
    Regards
    Sumit Agarwal

  • Question Related to Check-box in Dialog Program

    Hi All-
    I desgined check box in Table Control... In my Internal table I have 41 records, When user click on Select all button it selects only first 14 records from the table control...When the user uses page-down, then click on Select all, selects remaining 14 records and so on...
    But how to select all the records at a time instead of using page-down...
    Please advice me how to solve my problem!!!!
    Thanks,
    Sony

    I would not suggest doing it like that.  Instead move the MODULE USER_COMMAND outside of that loop.
    *  Screen Flow Logic 
    PROCESS AFTER INPUT.
    LOOP AT i_x002 .
    ENDLOOP.
    MODULE user_command_0600 .
    *  Module coding
    MODULE user_command_0600 input..
    CASE sy-ucomm.
    WHEN 'SELA'.
    loop at i_x002.
    i_x002-flag = 'X'.
    MODIFY i_x002.
    endloop.
    WHEN 'DELA'.
    loop at i_x002.
    i_x002-flag = space.
    MODIFY i_x002.
    endloop.
    ENDCASE.
    endmodule.
    Regards,
    Rich Heilman

  • How to create a tree structure with check boxs using Windows Activex Control?

    Hi,
    I am very new to LabVIEW. I am trying to create a tree structure with Check Boxes like the below. It would be great if someone would show me a right direction to go forward.
    The aim is to select the item and one by one i have to get the Path and give as an input to by application VI.
    Thanks and Best Regards
    Prathap

    Hi Andy,
    Sorry i pasted the Picture.. Pls find the attached picture.
    Following are my requirement:
    1) I need to populate a tree given a root directory, listing all the Folders and file of cetain pattern(*.pjt... ther will be only one *.pjt in every subfolders).
    2) I need a check box for every *.pjt to select the its path. The list of pjt files selected are used for my automation test suit.
    Pls let me know if you need more info.
    Best Regards
    Prathap
    Attachments:
    tree.JPG ‏73 KB

  • Check box symbol in Tree control

    Hi,
    I have built a code for using checkbox symbol in tree function and stuck to get the selected check box item. 
    Actually my requirement is to to use tree with check box and do the multiple selection and get the selected item list. I have completed till the Check box selection but not able to get the all selected item list.
    I have attached the code for your reference.
    Please let me know hot to do this, If any one knows .
    Thanks in advance
     

    Sorry I didn't get here sooner, here is some example code I made a while ago that supports listboxes, MCLB, and Tree selections.  It also supports nested levels to the tree, select all or select none, and selecting deselecting parent items, and partial selection of parents if children selection are mixed.  Oh and it supports disabling items so the user can't change the selected state.
    https://decibel.ni.com/content/docs/DOC-42155

  • Check box Handling in ALV Tree Control

    Hi All,
    I am implementing a scenario wherein which I need to get the checked items and process upon the user action. In the implementation I am not getting the checked values.
    This is how I have implemented.
    I have added a check box field in the Field catalog which is type c
    * Item Layout for the Check box.
      lwa_item_layout-fieldname = 'CHKBOX'.
      lwa_item_layout-class   = cl_gui_column_tree=>item_class_checkbox.
      lwa_item_layout-editable = 'X'.
      APPEND lwa_item_layout TO lt_item_layout.
    After that I have tried to used this code to get the checked items.
       CALL METHOD tree1->get_checked_items
              IMPORTING
                et_checked_items = t_checked.
    But I am not getting any values in the table.
    Further I have tried to use the Event  <b>checkbox_change</b> for the check box logic( I am not sure but I thought it is)
    But the event is not triggering with this... Please Help me in this regard...

    CLASS cl_toolbar_event_receiver DEFINITION.
        PUBLIC SECTION.
    *      DATA: checked TYPE c,
    *            fieldname TYPE lvc_fname,
    *            node_key TYPE lvc_nkey.
          METHODS: on_function_selected
                     FOR EVENT function_selected OF cl_gui_toolbar
                       IMPORTING fcode.
          METHODS: handle_check_box_change
          FOR EVENT checkbox_change OF cl_gui_alv_tree
          IMPORTING checked
                    fieldname
                    node_key.
      ENDCLASS
    Does this Implementation giving any problem for this?

  • How to handle check box events in alv tree.

    hi,
    i am working in CL_GUI_COLUMN_TREE class.Also using Check box. Now i want to handle events for check box . I am new to ABAP Objects.
    Pls expaline in detail or send code
    thanks in advance,
    senthil kumar.r

    Hello Senthil
    Have a look at the sample report
    SAPCOLUMN_TREE_CONTROL_DEMO
    . The crucial points are:
    <b>(1) Register the required events at the control</b>
    * define the events which will be passed to the backend
      " checkbox change
      event-eventid = CL_GUI_COLUMN_TREE=>EVENTID_checkbox_change.
      event-appl_event = 'X'.
      append event to events.
      CALL METHOD G_TREE->SET_REGISTERED_EVENTS
        EXPORTING
          EVENTS = EVENTS
        EXCEPTIONS
          CNTL_ERROR                = 1
          CNTL_SYSTEM_ERROR         = 2
          ILLEGAL_EVENT_COMBINATION = 3.
      IF SY-SUBRC <> 0.
        MESSAGE A000.
      ENDIF.
    <b>(2) Set the event handler</b>
    assign event handlers in the application class to each desired event
      SET HANDLER G_APPLICATION->HANDLE_CHECKBOX_CHANGE FOR g_tree.
    <b>(3) Define and implement event handler method</b>
      METHOD  HANDLE_CHECKBOX_CHANGE.
        " this method handles the checkbox_change event of the tree
        " control instance
        " show the key of the node and the name of the item
        " of the clicked checkbox in a dynpro field
        G_EVENT = 'CHECKBOX_CHANGE'.
        G_NODE_KEY = NODE_KEY.
        G_ITEM_NAME = ITEM_NAME.
        CLEAR  G_HEADER_NAME.
      ENDMETHOD.
    Regards
      Uwe

Maybe you are looking for

  • Can I exchange my older version iPod for a newer one?

    I have an iPod touch 3rd Gen, 8GB. It's really not that old but it seems that every time I sync it to my computer I'm being told that less and less apps are applicable with my iPod. Over time I know that my iPod is probably going to be obselete which

  • NiUSRP 1.2 / USRP N210 / beat frequencies LO

    Hi, I made a Labview 2012 program based on some examples of the ni USRP 1.2 software, for being executed in my USRP N210. The objective of my program is to measure a signal, that right now is generated by a RF signal generator, after doing an fft plo

  • Leading Zeroes

    I have got the result below: 1 2 3 4 5 etc Eg:000001 000002 000003 I want to add leading zeros before the number. How is it be possible? thanks satya Edited by: user608405 on Aug 6, 2009 11:02 PM

  • OTL Self Service Error Message

    We use OTL Timekeeper functionality for entering time, but want to switch to some Self Serve OTL time entry also. The error messages we are currently using work fine in OTL. The overtime rule goes out, validates the time entered, and returns an error

  • Firefox opens a new window and moves the active tab to it. How do I stop this?

    Got multiple tabs open. Firefox suddenly closes the tab I'm working on (this seems to happen when I'm scrolling) and moves it to a new window, shifting the focus to a previously inactive tab. What a swell feature! How can I get rid of it?