Single-click on a Tree not cancelable
Hi,
I have a component that includes a Tree, and the Tree uses a
custom TreeItemRenderer. The render extends the default one, and
adds a small graphic next to each Tree node's label.
If users click the graphic, I'd like to prevent the default
single-click behavior of the tree. For example, I'd like to prevent
the node being selected.
I've found that MouseEvent.CLICK is not cancelable, so
preventDefault() has no effect.
Is there a way to prevent the Tree from reacting to the
single click, if the single-click is on the graphic in my item
renderer?
"Marc Missire" <[email protected]> wrote in
message
news:gap3mm$def$[email protected]..
> Hi,
>
> I have a component that includes a Tree, and the Tree
uses a custom
> TreeItemRenderer. The render extends the default one,
and adds a small
> graphic
> next to each Tree node's label.
>
> If users click the graphic, I'd like to prevent the
default single-click
> behavior on the tree. For example, I'd like to prevent
the node being
> selected.
>
> I've found that MouseEvent.CLICK is not cancelable, so
preventDefault()
> has no
> effect.
>
> Is there a way to prevent the Tree from reacting to the
single click, if
> the
> single-click is on the graphic in my item renderer?
Setting mouseChildren to false on the image might work.
HTH;
Amy
Similar Messages
-
Single click on flash is not working for IE
Any one know why single clicking on flash movies is not
working in IE but works in other browsers?
IE will only work with a double click. Any work around for
this IE problemThe single click issue is (I believe) related to an Active X
change Microsoft made in an IE "patch."
This might be what you're looking for:
http://www.amarasoftware.com/flash-problem.htm
There are many variations on this fix, but I believe you have
to get the object and embed statements out of your HTML file and
put them in a Javascrript file that is called by your HTML file.
I have successfully made the change to a few pages, but not
CF pages.
Hope that helps.
Rick -
Handling single click in alv tree
Hello Friends,
Is there an event triggered,for single click on an alv tree.
regards
kaushikhi ,
it_fieldcat-hotspot = 'X'.
regards,
venkat.
Edited by: venkat appikonda on Mar 13, 2008 8:11 PM
Edited by: venkat appikonda on Mar 13, 2008 8:12 PM -
Single Click on simple tree node
Hi Experts,
I have a problem ,please help me.
I need event is trigger on single click on node of simple tree.There is event of double click but i need on single click only.
If you have any test program please forward it also.
Ankur Garg.i dont think for single click you can get any event in simple list... you can make hotspot on by this way single click will trigger the at line-selection event.
REPORT ZSPDEXDET LINE-SIZE 200 line-count 19(4).
TABLES : MAST,STPO,MARA,MARC.
INCLUDE <SYMBOL>.
DATA : BEGIN OF I_BOM OCCURS 0.
INCLUDE STRUCTURE STPOX.
DATA : END OF I_BOM.
DATA : BEGIN OF ITAB OCCURS 0,
STUFE LIKE STPOX-STUFE,
IDNRK LIKE STPOX-IDNRK,
WEGXX LIKE STPOX-WEGXX, "NODE NO
TTIDX LIKE STPOX-TTIDX, "NODE NO WITH PARENTNODE + 1
VWEGX LIKE STPOX-VWEGX, "NODE NO OF PARENT
MENGE LIKE STPOX-MENGE,
SYMBOL,
END OF ITAB.
DATA : ITAB1 LIKE ITAB OCCURS 0 WITH HEADER LINE,
ITAB2 LIKE ITAB OCCURS 0 WITH HEADER LINE.
DATA : V_PARENTID LIKE STPOX-VWEGX,
V_WEGXX LIKE STPOX-WEGXX,
V_STUFE LIKE STPOX-STUFE,
PREV_STUFE LIKE STPOX-STUFE.
DATA : V_OFFSET TYPE I VALUE 1,
V_CONTENT TYPE I,
TABIX LIKE SY-TABIX,
V_TABIX LIKE SY-TABIX,
T_TABIX LIKE SY-TABIX,
V_SYMBOL,
V_LINE LIKE SY-TABIX,
T_INDEX TYPE I.
DATA : V_PAGE LIKE SY-PAGNO,
T_PAGE LIKE SY-PAGNO,
V_LIN LIKE SY-LILLI.
PARAMETERS : P_MATNR LIKE MAST-MATNR,
P_WERKS LIKE MARC-WERKS.
PERFORM BOM_EXPLODE.
ITAB1[] = ITAB[].
READ TABLE ITAB1 INDEX 1.
APPEND ITAB1 TO ITAB2.
PERFORM PRINT TABLES ITAB2.
AT LINE-SELECTION.
V_LIN = SY-LILLI.
T_PAGE = V_PAGE.
PREV_STUFE = ITAB2-STUFE.
V_STUFE = ITAB2-STUFE + 1.
V_WEGXX = ITAB2-WEGXX.
V_SYMBOL = ITAB2-SYMBOL.
IF ITAB2-SYMBOL = '+'.
ITAB2-SYMBOL = '-'.
MODIFY ITAB2 INDEX V_TABIX.
ELSEIF ITAB2-SYMBOL = '-'.
ITAB2-SYMBOL = '+'.
MODIFY ITAB2 INDEX V_TABIX.
ENDIF.
LOOP AT ITAB WHERE STUFE = V_STUFE AND VWEGX = V_WEGXX.
V_TABIX = V_TABIX + 1.
IF V_SYMBOL = '+'.
MOVE-CORRESPONDING ITAB TO ITAB2.
ITAB2-SYMBOL = '+'.
INSERT ITAB2 INDEX V_TABIX.
ELSEIF V_SYMBOL = '-'.
IF V_TABIX GT 2.
LOOP AT ITAB2 FROM V_TABIX WHERE STUFE = PREV_STUFE.
T_TABIX = SY-TABIX.
T_TABIX = T_TABIX - 1.
EXIT.
ENDLOOP.
IF V_TABIX LE T_TABIX.
DELETE ITAB2 FROM V_TABIX TO T_TABIX.
ELSE.
LOOP AT ITAB2 FROM V_TABIX.
* T_TABIX = T_TABIX + 1.
IF ITAB2-STUFE GT PREV_STUFE.
DELETE ITAB2 INDEX SY-TABIX.
ELSE.
EXIT.
ENDIF.
ENDLOOP.
* DELETE ITAB2 FROM V_TABIX WHERE STUFE LT V_STUFE.
ENDIF.
EXIT.
ELSE.
DELETE ITAB2 FROM V_TABIX.
EXIT.
ENDIF.
ENDIF.
ENDLOOP.
SY-LSIND = 0.
T_INDEX = 1.
PERFORM PRINT TABLES ITAB2.
SCROLL LIST INDEX T_INDEX TO PAGE T_PAGE . " LINE V_LIN .
*& Form BOM_EXPLODE
* text
* --> p1 text
* <-- p2 text
FORM BOM_EXPLODE .
CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
EXPORTING
CAPID = 'PP01'
DATUV = SY-DATUM
MEHRS = 'X'
MTNRV = P_MATNR
WERKS = P_WERKS
TABLES
STB = I_BOM
EXCEPTIONS
ALT_NOT_FOUND = 1
CALL_INVALID = 2
MATERIAL_NOT_FOUND = 3
MISSING_AUTHORIZATION = 4
NO_BOM_FOUND = 5
NO_PLANT_DATA = 6
NO_SUITABLE_BOM_FOUND = 7
CONVERSION_ERROR = 8
OTHERS = 9.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ITAB-IDNRK = P_MATNR.
ITAB-MENGE = '1'.
ITAB-STUFE = '0'.
ITAB-WEGXX = '0'.
ITAB-TTIDX = '0'.
ITAB-VWEGX = '-1'.
ITAB-SYMBOL = '+'.
APPEND ITAB.
CLEAR ITAB.
LOOP AT I_BOM.
MOVE-CORRESPONDING I_BOM TO ITAB.
APPEND ITAB.
CLEAR ITAB.
ENDLOOP.
ENDFORM. " BOM_EXPLODE
*& Form PRINT
* text
* -->P_ITAB1 text
FORM PRINT TABLES P_ITAB1 STRUCTURE ITAB.
DATA : V_ID LIKE STPOX-VWEGX.
DATA : T_LINE LIKE SY-TABIX,
V_LINE TYPE I,
V_HLINE TYPE I.
DATA : PAGE TYPE I.
DESCRIBE TABLE P_ITAB1 LINES V_LINE.
T_LINE = V_LINE - 1.
LOOP AT P_ITAB1.
V_OFFSET = P_ITAB1-STUFE * 3.
V_CONTENT = P_ITAB1-STUFE * 6.
V_LINE = P_ITAB1-STUFE * 4.
IF P_ITAB1-STUFE NE 0.
V_HLINE = V_LINE + 2.
ELSE.
V_HLINE = 2.
ENDIF.
* T_INDEX = T_INDEX + 1.
COMPUTE PAGE = SY-TABIX MOD 13.
IF PAGE EQ 0.
NEW-PAGE.
V_PAGE = SY-PAGNO.
* T_INDEX = 0.
ENDIF.
V_TABIX = SY-TABIX.
IF P_ITAB1-SYMBOL = '+'.
WRITE : /.
WRITE AT : V_OFFSET SYM_PLUS_FOLDER AS SYMBOL
COLOR 4 INTENSIFIED HOTSPOT.
WRITE : AT V_CONTENT P_ITAB1-IDNRK,P_ITAB1-MENGE.
HIDE : P_ITAB1,V_TABIX,V_PAGE.
ELSEIF P_ITAB1-SYMBOL = '-'.
WRITE : /.
WRITE AT V_OFFSET SYM_MINUS_FOLDER AS SYMBOL
COLOR 4 INTENSIFIED HOTSPOT.
WRITE : AT V_CONTENT P_ITAB1-IDNRK,P_ITAB1-MENGE.
HIDE : P_ITAB1,V_TABIX,V_PAGE.
ENDIF.
ENDLOOP.
ENDFORM. " PRINT
regards
shiba dutta -
Windows 7 classic shell without single click??
I have 700 windows xp machines in a retail environment that I am prepping to swap out with Windows 7 machines. These xp machines are joined to our domain, and fairly locked down via group policy. I am in the process of putting together our new
Windows 7 image and building the group policies. Our goal is to maintain as much of the same look and feel that we have with our Win XP machines for this application.
That being said - I have enabled Windows Classic theme (by leaving UserConfiguration > Administrative Templates > Control Panel > Personalization > Force a specific visual style or force Windows Classic blank). This seems to work just fine.
I have the expected results for background, start menu, window appearance. What is confusing me is - my mouse somehow got set to single click. I do not want this. It seems to have happened with turning on windows classic?? I haven't
been able to find a GPO or GPP (or registry hack, for that matter) to turn it off.
I look in Explorer > Folder and search options > Click items as follows - Double-click to open an item is the radio button that is marked active. I was able to set my staging user (non admin level) to a local admin, re-login, click Single click
to open an item --> click apply --> click double click to open an item --> click apply and ok. Now things are as I want them. It seems that by manually making this change it does the trick. I won't have this luxury in the field.
Any input as to a workaround or what is actually going on would be greatly appreciated.
Thanks
sbHi,
To disable the "single click", you need to disable the GPO setting "Turn on Classic Shell" under the node given below,
User Configuration\Policies\Administrative Templates\Windows Components\Windows Explorer\Turn on Classic Shell
Regards,
Gopi
JiJi
Technologies -
Single click on tree control navigation
Hello I have a tree control where I have include the navigation, I know that there is a method
HANDLE_NODE_DOUBLE_CLICK FOR G_TREE
but is there an method for only one click, I want to change my alv grid data when I click on several nodes in my tree controlHello Muhammet
I have re-written my sample report ZUS_SDN_TWO_ALV_GRIDS into ZUS_SDN_TREE_AND_GRID_CONTROL which is now display a tree control together with the ALV grid.
When you analyze this new report you will see that every step of the program logic is as I described in my previous e-mails.
*& Report ZUS_SDN_TWO_ALV_GRIDS
*& Screen '0100' contains no elements.
*& ok_code -> assigned to GD_OKCODE
*& Flow logic:
* PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
* PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
*& Thread: single click on tree control navigation
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1143770"></a>
REPORT zus_sdn_tree_and_grid_control.
TYPE-POOLS: abap, cntl.
TYPES: node_table_type LIKE STANDARD TABLE OF mtreesnode
WITH DEFAULT KEY.
* CAUTION: MTREESNODE is the name of the node structure which must
* be defined by the programmer. DO NOT USE MTREESNODE!
CONSTANTS:
BEGIN OF c_nodekey,
root TYPE tv_nodekey VALUE 'Root', "#EC NOTEXT
child1 TYPE tv_nodekey VALUE 'Child1', "#EC NOTEXT
* child2 type tv_nodekey value 'Child2', "#EC NOTEXT
new1 TYPE tv_nodekey VALUE 'New1', "#EC NOTEXT
new2 TYPE tv_nodekey VALUE 'New2', "#EC NOTEXT
* new3 type tv_nodekey value 'New3', "#EC NOTEXT
* new4 type tv_nodekey value 'New4', "#EC NOTEXT
END OF c_nodekey.
DATA:
gd_okcode TYPE ui_func,
gd_repid TYPE syst-repid,
go_docking TYPE REF TO cl_gui_docking_container,
go_splitter TYPE REF TO cl_gui_splitter_container,
go_cell_left TYPE REF TO cl_gui_container,
go_cell_right TYPE REF TO cl_gui_container,
go_tree TYPE REF TO cl_gui_simple_tree,
go_grid1 TYPE REF TO cl_gui_alv_grid,
** go_grid2 TYPE REF TO cl_gui_alv_grid,
gs_layout TYPE lvc_s_layo.
DATA:
gt_knb1 TYPE STANDARD TABLE OF knb1,
gt_knvv TYPE STANDARD TABLE OF knvv.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
IMPORTING
e_row
e_column
es_row_no
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_double_click.
* define local data
DATA:
ls_knb1 TYPE knb1.
CHECK ( sender = go_grid1 ).
READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
** CALL METHOD go_grid1->set_current_cell_via_id
** EXPORTING
*** IS_ROW_ID =
*** IS_COLUMN_ID =
** is_row_no = es_row_no.
* Triggers PAI of the dynpro with the specified ok-code
CALL METHOD cl_gui_cfw=>set_new_ok_code( 'DETAIL' ).
ENDMETHOD. "handle_double_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
* CLASS LCL_APPLICATION DEFINITION
CLASS lcl_application DEFINITION.
PUBLIC SECTION.
CLASS-DATA:
md_event TYPE string READ-ONLY,
md_node_key TYPE tv_nodekey READ-ONLY.
CLASS-METHODS:
handle_node_double_click
FOR EVENT node_double_click
OF cl_gui_simple_tree
IMPORTING node_key,
handle_expand_no_children
FOR EVENT expand_no_children
OF cl_gui_simple_tree
IMPORTING node_key.
ENDCLASS. "LCL_APPLICATION DEFINITION
* CLASS LCL_APPLICATION IMPLEMENTATION
CLASS lcl_application IMPLEMENTATION.
METHOD handle_node_double_click.
" this method handles the node double click event of the tree
" control instance
" show the key of the double clicked node in a dynpro field
md_event = 'NODE_DOUBLE_CLICK'.
md_node_key = node_key.
" Trigger PAI and set ok-code = 'DETAIL'
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'DETAIL'
* IMPORTING
* rc =
MESSAGE md_node_key TYPE 'I'.
ENDMETHOD. "HANDLE_NODE_DOUBLE_CLICK
METHOD handle_expand_no_children.
" this method handles the expand no children event of the tree
" control instance
DATA: node_table TYPE node_table_type,
node TYPE mtreesnode.
" show the key of the double clicked node in a dynpro field
md_event = 'EXPAND_NO_CHILDREN'.
md_node_key = node_key.
IF node_key = 'Child1'.
* add two nodes to the tree control (the children of 'Child1')
* Node with key 'New1'
CLEAR node.
node-node_key = c_nodekey-new1.
node-relatkey = c_nodekey-child1.
node-relatship = cl_gui_simple_tree=>relat_last_child.
node-isfolder = ' '.
node-text = 'New1'(ne1).
APPEND node TO node_table.
* Node with key 'New2'
CLEAR node.
node-node_key = c_nodekey-new2.
node-relatkey = c_nodekey-child1.
node-relatship = cl_gui_simple_tree=>relat_last_child.
node-n_image = '@10@'.
node-expander = ' '.
node-text = 'New2'(ne2).
APPEND node TO node_table.
CALL METHOD go_tree->add_nodes
EXPORTING
table_structure_name = 'MTREESNODE'
node_table = node_table
EXCEPTIONS
failed = 1
error_in_node_table = 2
dp_error = 3
table_structure_name_not_found = 4
OTHERS = 5.
IF sy-subrc <> 0.
** MESSAGE A000.
ENDIF.
ENDIF.
ENDMETHOD. "HANDLE_EXPAND_NO_CHILDREN
ENDCLASS. "LCL_APPLICATION IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_knb1 UP TO 100 ROWS
WHERE bukrs = '1000'.
PERFORM init_controls.
* Display data
gs_layout-grid_title = 'Customers: Sales Areas'.
CALL METHOD go_grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'KNVV'
is_layout = gs_layout
CHANGING
it_outtab = gt_knvv
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Link the docking container to the target dynpro
gd_repid = syst-repid.
CALL METHOD go_docking->link
EXPORTING
repid = gd_repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* NOTE: dynpro does not contain any elements
CALL SCREEN '0100'.
* Flow logic of dynpro (does not contain any dynpro elements):
*PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'. " contains push button "DETAIL"
* SET TITLEBAR 'xxx'.
* Refresh display of detail ALV list
CALL METHOD go_grid1->refresh_table_display
* EXPORTING
* IS_STABLE =
* I_SOFT_REFRESH =
EXCEPTIONS
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
TRANSLATE gd_okcode TO UPPER CASE.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
* User has pushed button "Display Details"
WHEN 'DETAIL'.
MESSAGE gd_okcode TYPE 'I'.
PERFORM entry_show_details.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form ENTRY_SHOW_DETAILS
* text
* --> p1 text
* <-- p2 text
FORM entry_show_details .
* define local data
DATA:
ld_row TYPE i,
ls_knb1 TYPE knb1.
IF ( gt_knvv IS INITIAL ).
SELECT * FROM knvv INTO TABLE gt_knvv
FOR ALL ENTRIES IN gt_knb1
WHERE kunnr = gt_knb1-kunnr.
ELSE.
REFRESH: gt_knvv.
ENDIF.
ENDFORM. " ENTRY_SHOW_DETAILS
*& Form INIT_CONTROLS
* text
* --> p1 text
* <-- p2 text
FORM init_controls .
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create splitter container
CREATE OBJECT go_splitter
EXPORTING
parent = go_docking
rows = 1
columns = 2
* NO_AUTODEF_PROGID_DYNNR =
* NAME =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Get cell container
CALL METHOD go_splitter->get_container
EXPORTING
row = 1
column = 1
RECEIVING
container = go_cell_left.
CALL METHOD go_splitter->get_container
EXPORTING
row = 1
column = 2
RECEIVING
container = go_cell_right.
* Create ALV grids
CREATE OBJECT go_grid1
EXPORTING
i_parent = go_cell_right
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Set event handler
SET HANDLER:
lcl_eventhandler=>handle_double_click FOR go_grid1.
PERFORM create_and_init_tree.
ENDFORM. " INIT_CONTROLS
*& Form CREATE_AND_INIT_TREE
* text
* --> p1 text
* <-- p2 text
FORM create_and_init_tree .
DATA: lt_node_table TYPE node_table_type,
lt_events TYPE cntl_simple_events,
ls_event TYPE cntl_simple_event.
* create a tree control
CREATE OBJECT go_tree
EXPORTING
parent = go_cell_left
node_selection_mode = cl_gui_simple_tree=>node_sel_mode_single " single node selection is used
EXCEPTIONS
lifetime_error = 1
cntl_system_error = 2
create_error = 3
failed = 4
illegal_node_selection_mode = 5.
IF sy-subrc <> 0.
** MESSAGE a000.
ENDIF.
* define the events which will be passed to the backend
" node double click
ls_event-eventid = cl_gui_simple_tree=>eventid_node_double_click.
** ls_event-appl_event = 'X'. " process PAI if event occurs
" NOTE: Do NOT register as application event !!!!!
APPEND ls_event TO lt_events.
CALL METHOD go_tree->set_registered_events
EXPORTING
events = lt_events
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
illegal_event_combination = 3.
IF sy-subrc <> 0.
** MESSAGE a000.
ENDIF.
SET HANDLER:
lcl_application=>handle_node_double_click FOR go_tree,
lcl_application=>handle_expand_no_children FOR go_tree.
* add some nodes to the tree control
* NOTE: the tree control does not store data at the backend. If an
* application wants to access tree data later, it must store the
* tree data itself.
PERFORM build_node_table USING lt_node_table.
* node_table_structure_name = 'MTREESNODE'
* A programmer using the tree control must create a structure in the
* dictionary. This structure must include the structure TREEV_NODE
* and must contain a character field with the name 'TEXT'.
CALL METHOD go_tree->add_nodes
EXPORTING
table_structure_name = 'MTREESNODE'
node_table = lt_node_table
EXCEPTIONS
failed = 1
error_in_node_table = 2
dp_error = 3
table_structure_name_not_found = 4
OTHERS = 5.
IF sy-subrc <> 0.
** MESSAGE a000.
ENDIF.
ENDFORM. " CREATE_AND_INIT_TREE
*& Form build_node_table
* text
* --> p1 text
* <-- p2 text
FORM build_node_table
USING
node_table TYPE node_table_type.
DATA: node LIKE mtreesnode.
* Build the node table.
* Caution: The nodes are inserted into the tree according to the order
* in which they occur in the table. In consequence, a node must not
* occur in the node table before its parent node.
* Node with key 'Root'
node-node_key = c_nodekey-root.
" Key of the node
CLEAR node-relatkey. " Special case: A root node has no parent
CLEAR node-relatship. " node.
node-hidden = ' '. " The node is visible,
node-disabled = ' '. " selectable,
node-isfolder = 'X'. " a folder.
CLEAR node-n_image. " Folder-/ Leaf-Symbol in state "closed":
" use default.
CLEAR node-exp_image. " Folder-/ Leaf-Symbol in state "open":
" use default
CLEAR node-expander. " see below.
node-text = 'Root'(roo).
APPEND node TO node_table.
* Node with key 'Child1'
node-node_key = c_nodekey-child1.
" Key of the node
" Node is inserted as child of the node with key 'Root'.
node-relatkey = c_nodekey-root.
node-relatship = cl_gui_simple_tree=>relat_last_child.
node-hidden = ' '.
node-disabled = ' '.
node-isfolder = 'X'.
CLEAR node-n_image.
CLEAR node-exp_image.
node-expander = 'X'. " The node is marked with a '+', although
" it has no children. When the user clicks on the
" + to open the node, the event
" expand_no_children is fired. The programmer can
" add the children of the
" node within the event handler of the
" expand_no_children event
" (see method handle_expand_no_children
" of class lcl_application)
node-text = 'Child1'(ch1).
node-style = cl_gui_simple_tree=>style_emphasized_positive.
APPEND node TO node_table.
ENDFORM. " build_node_table
Regards
Uwe -
I have to "single-click" twice (not double click) to open an item in the Dock.
Can someone confirm if this is Expected Behavior?? (OS = Mavericks)
If you have Assigned an application in your Dock to a Desktop & Display in the application's Dock >> Options (ex: Assigned To: Desktop on Display 2):
Click once on the application icon in the Dock, the application's Menu will populate on the top of your screen, but not the application itself (yet), click the application icon a second time, the application will now show too.
Docked Applications that do not have an Assigned To: Desktop & Display in the Dock options, you only need to single click.
FYI:
For odd Dock behaviors otherwise try this:
You may have a corrupted Dock preferences file.
Open the Finder. From the Finder menu bar click Go > Go to Folder
Type or copy paste the following:
~/Library/Preferences/com.apple.dock.plist (plist = preference list file)
Click Go then move the com.apple.dock.plist file to the Trash, or move it to your Desktop.
Restart your Mac and see if the behavior is resolved. You will have re-configure your Dock settings.From where are you launching Mail? The only place, unless I've missed or forgotten something, you can launch an application with a single click is from the Dock. Is this what you're doing, or are you attempting to launch Mail from the Applications folder?
Regards. -
There was a way (before Mavericks) I could single click on an email in the "prevue pane" and it would highlite but not open. I could then either delete it or click again and it would open. With Mavericks that doesn't seem to be available making it impossible to delete an email in the prevue pane before I open it. Its frustrating to have to go through all the monkey motions when I know I want to delete it from the get-go. Does anyone know who to configure for that operation? I'm using an iMac.
Wow, have you ever seen 1 Billion in hard cash? If not, I assure you it exists as well.
Try not to pick apart what others write because you "have not seen it."
I run TWO programs for protection of my MAC now and have been for sometime b/c developers of them become complacid thinking MAC is impermeable.
My MAC locked me out of it and two externals and when I finally did get back into them Norton Anti-Virus found a "worm." When I asked the program to find the origin, it was traced back to an email, as you said, that I opened unintentionally. I still have two external HDs for backup and a cloud backup now.
When ClamX ran after Norton was finished, ClamX found what it called as "spyware," and it's origin was in my email also. I tried to delete the emails after the programs (both) identified the infected files, however once deleted and the computer is restarted, they were still there because I ran the scans again.
Now since we are no longer talking about how to turn on and off the view pane in apple mail; riddle me this, why can't the developers of these antivirus and antispyware/malware programs get together and develop ONE PRODUCT that catches 90-95% of the viruses/worms/spyware/malware ect that get onto MAC's? Is it because they are too busy thinking they don't exist?
I still run both programs and feel protected between the two. If Norton said it was a "worm" then I believe it was a worm and if ClamX called it "spyware" then I believe it is spyware.
I had to wipe my MAC and do a fresh install to get it working again, then I had to open one of those externals (which was very, very difficult) multiple times until finally it displayed the message "you can view, but not change the data." I exported as much as I could to my cloud and I had to format both of those too.
I still run both programs as I feel protected between the two. If Norton tells me it is a "worm" then I believe it is a "worm;" if ClamX tells me it is "spyware" then I believe it is "spyware." If it happens again, which my hope is that it won't, I will be more than happy to send the infected files to you!!
Try not to "forum rage." Support forums to post experiences and find answers, not nit-pick or claim not existance b/c you have not experienced it for yourself. -
I had Snow Leopard and was using iWeb and Filezilla for my website (not MobileMe). Wanting to move to single-click publishing (supported by MobileMe), I now find it is not supported by iCloud and Mountain Lion. I feel cheated, having bought it mainly for this purpose! The other thing they don't tell you is that Mountain Lion disables OfficeMac, and I am considering uninstalling it for that reason - do I get my money back?!
You stated; "Mountain Lion disables OfficeMac"
That is not true.
Mountain Lion does not have Rosetta so it is not capable of executing PowerPC code. If you have MS Office 2004 that is coded in PowerPC code and will not run in Mountain Lion. What you need to do is upgrade to an Intel version of Office.
Allan -
SetRowSelectionInterval() not working on single-click in JTable
I have code that tries to move the highlighted row in a JTable back to the line you just edited instead of moving to the next line when you press enter after editing a cell (like you would normally see in a JTable or any spreadsheet program). If you double-click in the cell and edit the name, the code works correctly, but if you only single click the cell and enter the name, the code doesn't move the highlight - even though I know the code is being executed.
The code is nothing more than:
if(row == 0)
setRowSelectionInterval(0,0);
else
setRowSelectionInterval(row-1,row);
with row being the row you want to set the highlight to.
Does anyone know why this would work for a double-click edit of a JTable but not a single-click?even though I know the code is being executed.How do you know that? Do you have a println immediately before the if (row == 0)of the code sample you gave us?
-
Single Click versus Double Click Action not working
Hello, having an issue with actions on symbols.
I have symbols that when clicked play at a specific location on the timeline.
Tthe first symbol uses single click (how I want it)
The rest of the symbols also use single click, but when I test the animation they require double click (even though they are coded to be single click)
Any ideas?
Here is a testing location for the animation:
http://www.contentx.com/DSU_discovery/MainAnim.html
Ideally I want single click on all the symbols. The double click is confusing.
Thanks!
zackHi, Zack-
Marie nailed it without even looking at the project. You are calling play() on a place that has a trigger that says stop(). The reason it plays the second time is rather complicated and has to do with the default play() behavior when there's a trigger, but the easy thing to do is to add one to your click event timecode.
For instance: Presentation.click currently says:
sym.play(22000);
Just replace it with:
sym.play(22001);
The next easiest thing to do is to change your play call to use the optional "false" parameter to force it to not execute the trigger at 2200.
sym.play(22000, false);
http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.html#symbolinstance
- scroll down to "play" to read more about the API
Hope that helps!
-Elaine -
I have always single clicked to open mail. Now I have to double click. I have not touched preferences or made changes. Any suggestions?
From where are you launching Mail? The only place, unless I've missed or forgotten something, you can launch an application with a single click is from the Dock. Is this what you're doing, or are you attempting to launch Mail from the Applications folder?
Regards. -
Safari Top Sites: Single click not enough
I don't know if this is a bug or anything else, but it's a bit annoying:
When you open a new tab in Safari and the Top Sites shows up, a single click on a site doesn't get you to the page, it just updates the Top Sites so the blue border is shown around the sites.
This is what it looks like: http://youtu.be/88W_KJAj8Hc
I hope this bug gets fixed soon or anybody has got the solution to this.
Greetings
SilvanIt's not possible to mark as unsolved.
You didn't mention you were doing this in full screen mode in your first post.
Try troubleshooting extensions and third party plug-ins.
From your Safari menu bar click Safari > Preferences then select the Extensions tab. Turn that off if there are any installed. Quit and relaunch Safari to test. If that helped, turn extensions back on then uninstall one a time to test.
If it's not an extensions issue, try troubleshooting third party plug-ins.
Back to Safari > Preferences. This time select the Security tab. Deselect: Allow all other plug-ins. Quit and relaunch Safari to test.
If that made a difference, instructions for troubleshooting plugins here.
If nothing above helped, try a Safe Mode boot. A Safe Mode boot deletes some system caches thay may help.
Startup your Mac in Safe Mode
A Safe Mode boot takes a longer than a normal boot so be patient.
Once you are in Safe Mode, click Restart from your Apple () menu.
Then try Safari TopSites in full screen mode.
BTW, it's not a bug. No problem using TopSites in full screen mode here. -
On right click, the focus is not set on tree node.
Dear members,
I have a tree and a database block, when i right click on a tree node, the focus is not set on the node.
If I first click on the node and then right click on selected node it populate the database block.
But I want to populate the datablock on right click.
how to implement it?
Regards:No body ever encountered this problem?
Any advice would be appreciated.
Thanks -
How to detect only single click and not double-click mouse events in Swing?
Hi,
In my application, I want to implement a functionality only for single click. But problem is on double click, first i can see a single click and then double click.
i.e e.getCount() return 1 and then 2 for double click. I want to avoid this situation.
Shouldn't it be just one event with a clickCount of 2? or any alternative solution?
Please let me know how can i stop this.
Thanks in advance..
Cheers
Somasekhar
Edited by: SomasekharPatil on Mar 13, 2009 3:36 PMMaybe something like the below example:
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.SwingUtilities;
import javax.swing.Timer;
public class SingleClickOnly {
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new SingleClickOnly().createGUI();
public void createGUI() {
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel label = new JLabel("Only acts on a single click");
label.addMouseListener(createListener());
frame.add(label);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
public MouseListener createListener() {
return new MouseAdapter() {
private int clickCount = 0;
private final Timer timer = new Timer(1000, new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (clickCount == 1) {
System.out
.println("Executing action on click count 1 only");
timer.setRepeats(false);
@Override
public void mouseClicked(MouseEvent event) {
clickCount = event.getClickCount();
System.out.println("Clicked: " + clickCount);
if (clickCount == 1) {
if (timer.isRunning()) {
timer.stop();
timer.start();
}Piet
Maybe you are looking for
-
How can i Store web links in my iPad for easy access?
How can i store web links in iPad for easy access?
-
Poll: Should NI release a full 8.0.1 installer?
I have created a poll on the LAVA forums, here: Should NI release a full 8.0.1 installer? http://forums.lavausergroup.org/index.php?showtopic=2807 Cast your vote, so that your voice will be heard. Regards, -Jim Message Edited by Jim Kring on 03-08-20
-
Getting login error messages in HTML
Hi all,I would like to have the login error messages (the ones put in ptmsgs_portalbrowsingmsgs.xml) formatted in HTML. The only way I found is to override the LoginModel changing the UIError returned (with SetHTMLMessage method).Is there other way t
-
Another question before I'd change to Blackberry: I use a mail account with several alias-adresses. On Android I installed K9-Mail where I can set more identities per mail account and which also will reply with the correct mail address. That means: i
-
Hi all,i have a problem; Can i know the type of a database field; for example date,character,integer? How can i retreive that? By Simon