Double click at a matrix cell
hello:
i wanna load a new form from a selected cell in a matrix using the cell double click... but i know how to do it.
Case SAPbouiCOM.BoEventTypes.et_DOUBLE_CLICK
oForm = objMain.objApplication.Forms.Item(FormUID)
If pVal.BeforeAction = False Then
If pVal.ItemUID = "orad1" And pVal.ColUID = "rte" Then
Try
oMatrix = oForm.Items.Item("orad1").Specific
If pVal.Row > 0 Then
Me.LoadForm(FormUID, pVal.Row)
End If
End If
Catch ex As Exception
objMain.objApplication.MessageBox(ex.Message)
End Try
End If
End If
Similar Messages
-
Overriding double click in JTable custom cell
I have a JTable where I reset the custom cells to become editable on a single click instead if a double using:
((DefaultCellEditor)table.getDefaultEditor(String.class)).setClickCountToStart(1);
Now what I need to do is display a JPopupMenu click a cell is double clicked. This works on cells that are not editable but the problem is that the user needs the popup dialog to display info for the cells that are editable.
I have used the basic way to implement a double click on a certain column (in this case my third column):
public void mouseClicked(MouseEvent e){
if (e.getClickCount() == 2 && table.getSelectedColumn() == 2 ){
popupMenu.show( e.getComponent(),
e.getX(), e.getY() );
But when double clicking, nothing happens.
Anyone have any idea to implement this or over-ride an editable cell?
Thanks,
ChrisThis still says <identifier> expect, how can I resove this please? Then you still have something wrong with your code. Since you didn't post your code how are we supposed to help?
The proper way to ask a question is to include your demo code that trys to illustrate the problem. Something like the following:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class TableRightClick extends JFrame
public TableRightClick()
JTable table = new JTable(10, 5);
table.addMouseListener( new MouseAdapter()
public void mousePressed(MouseEvent e)
if ( SwingUtilities.isRightMouseButton(e) )
// if (e.isPopupTrigger())
JTable source = (JTable)e.getSource();
int row = source.rowAtPoint( e.getPoint() );
int column = source.columnAtPoint( e.getPoint() );
System.out.println(column);
source.changeSelection(row, column, false, false);
table.setPreferredScrollableViewportSize(table.getPreferredSize());
getContentPane().add( new JScrollPane(table) );
public static void main(String[] args)
TableRightClick frame = new TableRightClick();
frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
frame.pack();
frame.setLocationRelativeTo( null );
frame.setVisible( true );
} -
Hello. I want to do a click in the ItemCode cell of the Inventory Matrix in certain forms. I use "SBO_Application.Forms(pval.FormUID).Items("38").Specific.Columns("1").Cells(1).Click" in et_FORM_LOAD event and it works with SDK 2004. Unfortunately it doesn't work when I compile it with SDK 2005...
Anybody knows how to do this with 2005????
ThanksHi X X,
Which forms do you want to do this on form load? The restriction could be that you do not have a business partner selected and it won't select the column. I tried it after I selected a business partner and the code below (which is the same as yours) works perfectly
SBO_Application.Forms.ActiveForm.Items.Item("38").Specific.Columns.Item("1").Cells.Item(1).Click()
Hope it helps,
Adele -
Previous entered value is lost when double click in the Jtable cell.
Hi,
When I double click the cell in the Jtable, the pervious enter data is lost. I unable to mask the double click event also. Could you please help me out.
Thanks in Advance,
With Thanks and Regards,
ShivaWhen I double click the cell in the Jtable, the pervious enter data is lost.No it isn't unless you've customized the code and made an error.
If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area. -
How? double click to edit a cell in a JTable (Custom Editor/TableModel)
I have a JTable with a custom table model that when you click anything in the first column a custom editor appears. I would like to know how to make the custom editor appear after a double click on any cell in the first column. It can probably be done with a MouseListener but is there any easier way to do this?
Thanks.this works for me.
public class MyJcustomEditor extends DefaultCellEditor {
public MyJcustomEditor(JTextField tField) {
super(tField);
setClickCountToStart(2);
} -
Mouse Double Click on an editable cell of JTable
Hi Pros:
Maybe this is an old question but no answser from Forum.
I have a JTable with adding MouseListener. I tried to put double click behavior on nay row in the table. The problem was that this action can obly work on the uneditable cell and do not work on editable cell.
Anyone have ideas and help me.
Thank you!Hi Wang,
I have a problem similar to the one you have some time back.
I have a query for which I need to use PreparedStatement .The query runs likes this :-
String str = " Select ? , ename from emp where deptno ? ";
The values of ? need to be assigned dynamically.
But I cannot create Prepared Statement from this query .
If you have got answer to your questions can you inform me at
[email protected]
Thanks in advance -
Double click does not edit cell
One of my users: double-clicking a cell is expected to place the focus into the cell for editing, but the expected behavior isn't happening. Cursor remains unchanged.
It's not the mouse; I tried a couple. It's not plist, deleted both.
It is something totally simple but what?Complementary questions :
(1) How is the app behaving if you run it in an other user account ?
(2) Was Mac Os updated to 10.6.2 thru "Applications Update" ?
If it was, it may be a good idea to apply the combo updater available from:
http://support.apple.com/kb/dl959
Yvan KOENIG (VALLAURIS, France) mercredi 24 mars 2010 16:17:34 -
How to disable right click on a Matrix Cell??
Hi,
It is impossible to disable a number of cells in a matrix. So I use the BubbleEvent = False in application item event to disable certain cells. My code is :
If pVal.FormUID = "MyForm" And pVal.BeforeAction = True And pVal.ItemUID = "MyMatrix" Then
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK Then
If pVal.Row <4 Then
BubbleEvent = False
End If
End If
End If
It works great with left click. But the cell still can be selected with a right click button. I've tried this code :
If pVal.FormUID = "MyForm" And pVal.BeforeAction = True And pVal.ItemUID = "MyMatrix" Then
If pVal.EventType = SAPbouiCOM.BoEventTypes.et_RIGHT_CLICK Then
If pVal.Row <4 Then
BubbleEvent = False
End If
End If
End If
and also this code in application rightclick event :
Private Sub SBO_Application_RightClickEvent(ByRef eventInfo As SAPbouiCOM.ContextMenuInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.RightClickEvent
If eventInfo.FormUID = "MyForm" And eventInfo.BeforeAction = True And eventInfo.ItemUID = "MyMatrix" Then
If eventInfo.Row < 4 Then
BubbleEvent = False
End If
End If
End Sub
But it doesn't work... It just make the right click menu not appear, but I still can click and edit the cell with a right click...
Is there a trick?
Regards,
Rinaldi SugionoIt is still the same..
up to now, I use this trick :
Private Sub SBO_Application_RightClickEvent(ByRef eventInfo As SAPbouiCOM.ContextMenuInfo, ByRef BubbleEvent As Boolean) Handles SBO_Application.RightClickEvent
If eventInfo.FormUID = "MyForm" And eventInfo.BeforeAction = True And eventInfo.ItemUID = "MyMatrix" Then
If SBO_Application.Forms.Item(eventInfo.FormUID).Items.Item("MyMatrix").Enabled = True And eventInfo.ItemUID = "MyMatrix" Then
If eventInfo.Row > 4 Then
Else
SBO_Application.Forms.Item("MyForm").Items.Item("MyMatrix").Specific.Columns.Item("MyColumn-1").Cells.Item(SBO_Application.Forms.Item("MyForm").Items.Item("MyMatrix").Specific.RowCount).Specific.String =_
SBO_Application.Forms.Item("MyForm").Items.Item("MyMatrix").Specific.Columns.Item("MyMatrix").Cells.Item(SBO_Application.Forms.Item("MyForm").Items.Item("MyMatrix").Specific.RowCount).Specific.String + ""
BubbleEvent = False
End If
End If
End If
End Sub
But it seems too ineffective... It runs slow, and results some "flicky cell"..
Edited by: Rinaldi Sugiono on Sep 23, 2010 4:49 AM -
Adding the ABAP code to SAP Query to support Query's ALV Double click.
Hi, Expert.
I need to add some ABAP Code into SAP Query (or Infoset) to support the double click event on ALV cell of result of query.
Is it possible & How to do ?
Thank you very much.
Best Regard
Nattapash C.Hi, Gautham.
I've put BREAK-POINT in all code section e.g. INITIALIZATION, END-OF-SELECTION..
I found there are some section for add code that will be executed when query is processing before output data to ALV.
What I need to know is Where I can input the code after ALV output. For support the Double Click Event on Query's ALV cell.
Best Regard,
Nattapash C. -
How to trigger event when double click on a tree node
I have this code which creates new tab in a remote Java Class.
treeView.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<TreeItem<String>>()
@Override
public void changed(ObservableValue<? extends TreeItem<String>> observable, TreeItem<String> oldValue, TreeItem<String> newValue)
System.out.println("Selected Text : " + newValue.getValue());
// Create New Tab
Tab tabdata = new Tab();
Label tabALabel = new Label("Test");
tabdata.setGraphic(tabALabel);
DataStage.addNewTab(tabdata);
Can you tell me how I can modify the code to open new tab when I double click on a tree node. In my code the tab is opened when I click once. What event handler do I need?import java.util.Arrays;
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.StackPane;
import javafx.scene.control.TreeCell;
import javafx.scene.control.TreeView;
import javafx.scene.control.TreeItem;
import javafx.scene.control.SelectionMode;
import javafx.util.Callback;
public class TreeTest extends Application {
public static void main(String[] args) {
launch(args);
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.setTitle("TreeView Test");
primaryStage.setScene(createScene());
primaryStage.show();
private Scene createScene() {
final StackPane stackPane = new StackPane();
final TreeView<String> treeView = new TreeView<String>();
treeView.setRoot(createModel());
treeView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
treeView.setCellFactory(new Callback<TreeView<String>, TreeCell<String>>() {
@Override
public TreeCell<String> call(TreeView<String> treeView) {
return new ClickableTreeCell();
stackPane.getChildren().add(treeView);
return new Scene(stackPane);
private TreeItem<String> createModel() {
TreeItem<String> root = new TreeItem<String>("RootNode");
TreeItem<String> packageA = new TreeItem<String>("package A");
packageA.getChildren().addAll(
Arrays.asList(new TreeItem<String>("A1"), new TreeItem<String>("A2"), new TreeItem<String>("A3"))
TreeItem<String> packageB = new TreeItem<String>("package B");
packageB.getChildren().addAll(
Arrays.asList(new TreeItem<String>("B1"), new TreeItem<String>("B2"), new TreeItem<String>("B3"))
root.getChildren().addAll(Arrays.asList(packageA, packageB));
return root;
private class ClickableTreeCell extends TreeCell<String> {
ClickableTreeCell() {
setOnMouseClicked(new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent event) {
// Handle double-clicks on non-empty cells:
if (event.getClickCount()==2 && ! isEmpty()) {
System.out.println("Mouse double-clicked on: " + getItem());
@Override
protected void updateItem(String item, boolean empty) {
super.updateItem(item, empty);
if (empty) {
setText(null);
} else {
setText(item); -
Double clicking matrix or grid cell
Hi there,
I Wanted to know if there's some way for my addon to know that a matrix or grid cell has been double clicked.
Thanks in advanceHi,
There are two events 'et_DOUBLE_CLICK' and 'et_CLICK ' in Item event's pval.
HTH
B Ravi Shankar -
Make Double Click event on Row, Matrix
Hi All,
I'm new in SDK and sorry for my English.
Please show me how to make double click event on Row of Matrix, i have created a table contain all Draft which Docstatus is open and order by ObjType(DocType), but i can't using Link Button on DocNum Column to view Object Detail . I think another way to do that is make a double click event on each row of matrix. Can I do like that ? plz show me . Thank for any suggestion.
ThanksHi Shafi,
This is my .srf file
<items><action type="add"><item uid="MTX_Data" type="127" left="15" tab_order="0" width="620" top="41" height="285" visible="1" enabled="1" from_pane="0" to_pane="0" disp_desc="0" right_just="0" description="" linkto="" forecolor="-1" backcolor="-1" text_style="0" font_size="-1" supp_zeros="0" AffectsFormMode="1"><AutoManagedAttribute /><specific SelectionMode="2" layout="0" titleHeight="19" cellHeight="19" TabOrder="0">
This is my code draw a form with matrix
Private Sub DrawForm()
Try
'Read File interface
LoadFromXML("DraftOpen.srf")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
oForm = SBO_Application.Forms.Item("DRFOPEN")
' Add Items
' Add a matrix
oMatrix = oForm.Items.Item("MTX_Data").Specific
oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single
This is my event
Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
If pVal.FormUID = "DRFOPEN" And pVal.ItemUID = "MTX_Data" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_DOUBLE_CLICK And pVal.BeforeAction = True Then
Try
oForm = SBO_Application.Forms.Item("DRFOPEN")
Dim omatrix As SAPbouiCOM.Matrix
omatrix = oForm.Items.Item("MTX_Data").Specific
If omatrix.RowCount > 0 Then
For i As Integer = 1 To omatrix.RowCount
If omatrix.IsRowSelected(i) = True Then
MessageBox.Show(omatrix.Columns.Item(1).Cells.Item(pVal.Row).Specific.value)
MessageBox.Show(omatrix.Columns.Item(2).Cells.Item(pVal.Row).Specific.value)
End If
Next
End If
Catch ex As Exception
SBO_Application.MessageBox(ex.Message)
End Try
End If
please help me to check this code. i don't know why it's still not working with double click event. sorry to disturb you.
Edited by: PeterHoang on Aug 30, 2011 10:15 AM -
Hi,
I'm developing an application where I'm using a datagrid that shows some information from an xml. Every cell in the grid is of the form
<itemRenderer>
<compoment>
<Vbox>
<HBox>
<Text/> //some text goes within this block
<Text/> //some text goes within this block
<Text/> //some text goes within this block
</Hbox>
</VBox>
</component>
</itemRenderer>
I have set a function call for the datagrid on ItemDoubleClick event; and this even gets triggered only when i double click on any TEXT that is on the cell; and NOT on any part of the cell. However, I would like to have this triggered when the user clicks anywhere in the cell.
Sombody please help,
Thanks!!Hi,
Thanks for the suggestion. Maybe I wasn't clear in explaining the issue here. Let me throw some light now, My code is somewhat like this
<mx:VBox opaqueBackground="{myxml.@data>10 ? '0xA2FEA2' : '0xFEA2A2' }" width="100%" height="100%" verticalScrollPolicy="off">
<mx:Box width="100%" height="100%">
<mx:Text id="txt1" text="Available" width="100%"/>
<mx:Text id="txt2" text="{myxml.@data}"/>
</mx:Box>
</mx:VBox>
The output is shown in the attachment. Now whenever I double click on the text in the datagrid(highlighted in blue in the attachment) my doubleclick even is fired; but if i click anywhere in the cell(green region in the attachment) my doubleclick event is not called.
Hope this helps! Looking forward for your assistance,
Thanks again!!
Cheers -
As title says.
Normally in Gantt Chart View, above the tasks there's a line which displays the contents of the cell you have selected, and allows you to edit the contents without having to double click the cell.
In my case, this line is not there, and it is slightly hindering my work.
So, does anyone know where I should go to re-enable this line?
Thanks a lot!Hi,
Go to file, then options, then display and check the "entry bar" option.
http://www.manageprojectsonsharepoint.com/blog/2012/04/02/microsoft-project-quick-tip-entry-bar/
Hope this helps.
Guillaume Rouyre - MBA, MCP, MCTS -
JTable's cell double click question...
Hello everyone,
My JTable has some cells with icons and text, and some contains only text.
All cells are editable, so double clicking on it goes to "edit mode" where user enters new value for the cell.
Here is my question: Can I somehow determine if user has clicked on an icon?
What I'm trying to do is to put additional information for cell (some comment), and if comment exists, icon will appear.
Double clicking on that icon, dialog will show that comment.
Thanks in advance!You did not mention that before. ...You are absolutely right, I didn't.
Let me emphasize importance of this:
Can I somehow determine if user has clicked on an icon?
And when I said "clicked" I mean double click when entering edit mode
of a cell.
If I could somehow determine that, I could than
perform desired action (open a dialog, or something else).
Thank you for your help so far.
Maybe you are looking for
-
Opening '.doc' files created by Appleworks
Hi,I couldn't find any discussion of this so am posting a question. Pages 2.0 opens all our normal Appleworks word processor (cwk?) files OK, and also opens "real" ".doc" files created by Word (from others, we don't have Word). Pages won't open Word
-
Posting pre-payment (Recurring) AP Invoice and subsequence cost allocation
Hi all We're trying to find the best solution to processing Rent/Rates AP invoices, where we receive an invoice at the beginning of the year for 12 months worth of costs. We're OK with paying the invoice either by instalments or immediately, however
-
Versistand version is 2013 sp1. I am using CSV stimulus expressions in my real-time sequence, and would like a channel to retain its current (last) value until a certain time step is reached. Is there a way to do this? Example CSV stimulus file: time
-
Manipulate Layout on ALV Grid with dynamic table
Dear all i'm generating a dynamic table depending of a date selection. That means that I show columns for weeks and the quantity of weeky migh change. Now the users wants to have a specific layout of the ALV grid with totals. When he saves the layout
-
i recently bought a macbook and i tried to connect my ipod to my macbook but it freezed and won't do anything. i previously used windows xp to update my ipod. any clue?