USEREXIT_FIELD_MODIFICATION in MV45AFZZ to set tooltip?
Hi,
i will set a tooltip for a specific field in VA02/03 (say Matnr). I try to use the exit
USEREXIT_FIELD_MODIFICATION in MV45AFZZ.
There is a possibility to change the structure SCREEN and it works but
there is no way to set a tooltip.
Does anyone know a way by using this EXIT or creating a SCREEN variant or
any otehr way?
Thanks.
Regards, Dieter
Hi,
I still do not have my desired solution.
I can not work with userexit_move_field_to_vbap because this userexit is called at the begin of creating a sales document.
With Userexit_field_modification I still have the problem that I loose the value in VBAP-KTGRM when I leave the dynpro.
My coding Inside Userexit_field_modification:
CASE screen-name.
WHEN 'VBAP-KTGRM'.
Set to INPUT on when in Create or Change mode
IF ( t180-trtyp = charh OR t180-trtyp = charv ).
screen-input = 1.
ENDIF.
ENDCASE.
These code lines make the field editable but I see no chance to save the entered value of VBAP-KTGRM.
Thanks again,
Tobi
Similar Messages
-
Problem with setting tooltips for items of a JCombobox
hi guys,
I want to set tooltips for items of JComboBox & the code that i have written is given below , but the tooltip text is set for all the items of Nonitindustrycombo but the tooltips remain the same even for Nonitdesgcombo's items.
Is that we need to refresh the ComboboxRenderer every time ?
I am not able to trace out the exact reason for this,please if anyone can suggest me something regarding this would be of great use to me.
class Searchpanel extends JPanel {
String[] str = null;
public SearchPanel(){
Nonitindustrycombo.addItem("--Select--");
ArrayList NonITindus = ERPModel.getAllNonitIndustry(); //gets all the items(strings) for Nonitindustrycombo
for (Iterator iter = NonITindus.iterator(); iter.hasNext();) {
String str = iter.next().toString();
Nonitindustrycombo.addItem(str);
SetTooltip(Nonitindustrycombo,NonITindus);
Nonitdesgcombo.addItem("--Select---");
ArrayList desg = ERPModel.getAllNonitDesg(); //gets all the items(strings) for Nonitdesgcombo
for (Iterator iter = desg.iterator(); iter.hasNext();) {
Nonitdesgcombo.addItem(iter.next());
SetTooltip(Nonitdesgcombo,desg);
class MyComboBoxRenderer extends BasicComboBoxRenderer
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected,
boolean cellHasFocus)
if (isSelected)
setBackground(list.getSelectionBackground());
setForeground(list.getSelectionForeground());
if (0 < (index))
list.setToolTipText(str[index - 1]);
else
setBackground(list.getBackground());
setForeground(list.getForeground());
setFont(list.getFont());
setText((value == null) ? "" : value.toString());
return this;
private void SetTooltip(JComboBox combo,ArrayList arr){
str = (String []) arr.toArray (new String [arr.size ()]);
combo.setRenderer(new MyComboBoxRenderer());
public static void main(String[] args){
new SearchPanel();
Thanks ,
vishal1) You where given a working example in your last posting on this topic. Compare your code with the working code to see whats different and fix it.
2) The code you posted doesn't compile.
3) You didn't use the "Code Formatting Tags" when you posted your code so it not readable. -
Setting tooltip for columns in a JTable
Hi!
I have a JTable inside a JScrollPane. How do I set tooltip for each columnheader of the JTable?
I have noted that if I don�t have the JTable within the JScrollPane, the columnheaders are not shown.
Regards
Johan1) You need to set the tooptip text on the renderer for the column (yourTable.getColumnModel().getColumn(...).getHeaderRenderer()).
2) The header is a separate component to the table. When you add a table to a scroll pane it automatically adds the header to the scroll pane too. You can get the component (yourTable.getTableHeader()) and add it to your own container if you wish. -
DVT Graph - setting tooltip dynamically.
Hello,
How can I set tooltip for a graph in java class?
I know setting tooltip in ".jsp" but I need to set it in java class.
Thanks,
MinaHi Sumit,
It worked creating the graph programmatically using the code below.
Thanks for your help.
Eduardo
Vector graphs = new Vector();
OAGraphTableBean graphTable = (OAGraphTableBean)webBean;
Dictionary graphBarDetails = new ArrayMap(10);
graphBarDetails.put("AGRFUNCTION", "none");
graphBarDetails.put("GRAPHTYPE", "vertical clustered bar");
graphBarDetails.put("GRAPHTITLE", "Cost Bar Graph");
graphBarDetails.put("YAXISLABEL", "Allocation Amount");
graphBarDetails.put("GRAPHSIZE", "medium");
graphBarDetails.put("CUSTGRAPHWIDTH", "");
graphBarDetails.put("CUSTGRAPHHEIGHT", "");
graphBarDetails.put("DISPLAYTOOLTIP", BooleanUtils.getBoolean(true));
graphBarDetails.put("XAXISLABEL", "");
graphBarDetails.put("DRILLDOWNURL", "");
graphBarDetails.put(DISPLAYED, BooleanUtils.getBoolean(true));
Vector graphCols = new Vector();
for(int j=0; j<2; j++) {
Dictionary graphData = new ArrayMap(5);
graphData.put("VIEWUSAGENAME", pViewUsage);
if(j ==0) {
graphData.put("VIEWATTRIBUTENAME", "AllocatedAmount");
graphData.put("GRAPHDATASTYLE", "data");
graphData.put("GRAPHDATAPROMPT", "Allocation Amount");
else {
graphData.put("VIEWATTRIBUTENAME", "AllocName");
graphData.put("GRAPHDATASTYLE", "groupLabels");
graphData.put("GRAPHDATAPROMPT","");
graphData.put("GRAPHSTOCKVALUE","none");
graphCols.addElement(graphData);
graphBarDetails.put("GRAPHDATACOLS", graphCols);
graphs.addElement(graphBarDetails);
graphTable.setGraphDetails(graphs); -
Setting ToolTips for items which are disabled.
Folks,
No offence meant if this is a repeat.
I have a JPopupMenu with Action as its components.
1) I have disabled certain menu items to false.
2) I would like to use a ToolTipText to show a message 'You have no permission'
when the user hovers over the menu items which are disabled/set to false
3) I wrote my own ToolTipText,but what is happening is that I am getting the tool tip text
for all menu items.
Please can anyone help me in how to get tooltiptext for menu items which are enabled to false?
Help much appreciated
// JPopupMenu
JPopupMenu pm = new JPopupMenu();
// Add Action
pm.add(new GraphAction());
pm.add(new DescendantsAction());
pm.add(new DebugAction()).setEnabled(false);
ToolTipTextForMenuItems.setToolTipForIndividualItem(pm.getComponent()) // Does not display any Tool Tip.
pm.add(new ResetAction()).setEnabled(false);
ToolTipTextForMenuItems.setToolTipTextForMenuItem(pm); // Shows ToolTipText for all menu items (disabled and enabled)
ToolTip Code
public class ToolTipTextForMenuItems {
private static final String TOOL_TIP_TEXT = "You have no permission";
public static void setToolTipTextForMenuItem(JPopupMenu popupMenu){
for (int i=0; i<popupMenu.getComponentCount(); i++){
Component c = popupMenu.getComponent(i);
if (c instanceof JComponent) {
((JComponent)c).setToolTipText(TOOL_TIP_TEXT);
public static void setToolTipForIndividualItem(Component c){
if (c instanceof JComponent) {
((JComponent)c).setToolTipText(TOOL_TIP_TEXT);
}Yes,I have looked at the Abstract Action code sent in
I have not used Action and Abstract Action before,hence if you can/could just
modify this as per my requirement,then I can enhance on this.
No offence meant for the above
Thanks -
Setting Tooltip on accordion section Does not work. Possible bug??
HI All,
I am using accordion control with following code.
var oAccordion = new sap.ui.commons.Accordion("accordionA");
//Building Section 1
var oSection1 = new sap.ui.commons.AccordionSection( "section1" );
oSection1.setTitle("Section 1kdfjkdasfjsdafffdfjkakfajfajfksafjdkfjdf");
oSection1.setTooltip("Section 1");
oSection1.setMaxHeight("100px");
for (var i=0 ; i < 5 ; i++){
var oCheckBox1 = new sap.ui.commons.CheckBox( "CheckBox1"+i );
oCheckBox1.setText("CheckBox1 "+i);
oSection1.addContent( oCheckBox1);
var oLabel1 = new sap.ui.commons.Label( "Label1"+i );
oLabel1.setText("Label 1 "+i);
oSection1.addContent( oLabel1);
oAccordion.addSection( oSection1 );
Though I am setting the Tooltip. While mouse hover I don't see the tooltip.
My thought is whenever sectionsTitle is truncated it should show the tooltip.
Please clarify when the tooltip will be visibile.
thank you for allyour inputs and help in advance.
regardsHi there,
It is a bug. You may use the title for each section until they get the tooltips to work.
Regards,
Alejandro. -
Unable to set tooltip for item (sap.ui.core.Item)
sap.ui.core.Item does not have the property 'tooltip'. But it borrows 'tooltip' property and setTooltip( ), getTooltip( ) methods from sap.ui.core.Element.
Still, if I set the tooltip for item, it is not reflected. What might be wrong?
Consider the following piece of code for example:
var item = new sap.ui.core.Item({text:'Item'});
item.setTooltip('tooltip');
var oCollection = new sap.ui.ux3.Collection({ items: item
var oCollectionInspector = new sap.ui.ux3.CollectionInspector({
'fitParent' : false,
'collections' : [
new sap.ui.ux3.Collection({
'title' : 'My Accounts',
'items' : [ item]
oCollectionInspector.placeAt('content');Tooltip is applied on the Item, but it seems Collection Inspector set its own tooltip for the Item. You can do something like this to set your own tooltip,
var item = new sap.ui.core.Item("myItem",{text:'Item'});
var oCollectionInspector = new sap.ui.ux3.CollectionInspector({
'fitParent' : false,
'collections' : [
new sap.ui.ux3.Collection({
'title' : 'My Accounts',
'items' : [ item]
oCollectionInspector.placeAt('content');
oCollectionInspector.onAfterRendering = function(){
sap.ui.ux3.CollectionInspector.prototype.onAfterRendering.apply(this,arguments);
$('#myItem').attr('title','My Tooltip'); -
Setting tooltip when the content of the cell is not visible in jtable
hello,
i want to set a tooltip when the content of the cell is not visible in jtable
please guide me.
thanks
dayathanks for your replay,
i did in this way
final TableColumn colTableColumn = getColumnModel().getColumn(vColIndex);
if (colTableColumn.getWidth() < this.getPreferredSize().width)
setToolTipText(value.toString());
else
setToolTipText(null);
}thanks
daya -
Hi,
I've prepared a very simple JApplet (that implements a MouseListener) which should do the following:
1) When the user clicks on it, it should play an audio clip (.au format),
2) When the user hovers over it, it should display a tooltip. The tooltip has been set on a JLabel which also contains an image.
It seems that I cannot combine both the tooltip and the audio clip. If I display the tooltip, the audio clip will not play. If I get rid of the tooltip, the audio clip plays fine. Any ideas what might be the problem.
Thanks for your help.I used the "title" attribute to set the tooltip on the cell in h:dataTable. It is working.
-
Setting tooltip on column headers in a datagridview
How to show the tooltip only on the column headers(not on other cells) of a datagridview, when the datagridview is databound?
Hi TuffyP,
In order to display the tooltip only in the header cells but not other cells, you need to disable the built-in tooltip showing functionality, and defines a new tooltip and show it when your mouse enters into the column header cells.
The following is steps and code:
1. Disable built-in tooltip by setting the showcelltooltip property of DataGridView to false.
Code Snippet
this.dataGridView1.ShowCellToolTips = false;
2. Add CellMouseEnter event handler for DataGridView.
Code Snippet
this.dataGridView1.CellMouseEnter += new DataGridViewCellEventHandler(dataGridView1_CellMouseEnter);
3. Implement dataGridView1_CellMouseEnter method
Code Snippet
void dataGridView1_CellMouseEnter(object sender, DataGridViewCellEventArgs e)
if (e.RowIndex == -1 && e.ColumnIndex!=-1)
tt.SetToolTip( this.dataGridView1,this.dataGridView1.Columns[e.ColumnIndex].HeaderCell.FormattedValue.ToString());
else
tt.Hide(this.dataGridView1);
If you have problems with the code, please don’t hesitate to let me know.
Best Regards,
Bruce Zhou -
Is it possible to set tooltips from schema definition?
Hi,
I'm setting up my form to use a schema to bind fields. What I'd like to do is to be able to define the tooltip to use for the field within the schema (so that for example when someone drags the field onto the form the tooltip is all set up too).
Is this possible, I can't find any way of doing it.
Thanks!Hi Ben,
If you are trying to bind the tooltip of a field to an element in your data connection, then you can do that once "Show Dynamic Properties" is set in Options ... Data Binding, the Tooltip caption in the Accessibility pallette becomes a hyperlink that opens the binding dialog.
If by within the schema you mean the under the annotation or documentation elements then, there doesn't seem to be a way to do it automatically but you can script it. Refer to this document on schema binding generally http://partners.adobe.com/public/developer/en/livecycle/lc_designer_XML_schemas.pdf and this post on Schema Metadata http://forms.stefcameron.com/2009/08/28/schema-metadata/.
That example uses Dublin Core appinfo but a documentation element works as well, so a schema element defined as;
<xs:attribute name="timezone" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>
User time zone. This is not a time zone of any calendar, but the time zone in which events appear on Calendar UI. Long format time zone ID (not PST, but America/Los_Angeles)
</xs:documentation>
</xs:annotation>
</xs:attribute>
Will have the documentation text added to the bound field under the <desc> element (If you have "Generate Descriptive Information" set).
<desc>
<exData name="Schema Annotation">User time zone. This is not a time zone of any calendar, but the time zone in which events appear on Calendar UI. Long format time zone ID (not PST, but America/Los_Angeles)</exData>
</desc>
So in the initialise event of the field you could place the following JavaScript (where TZ is the field name).
TZ.assist.toolTip.value = TZ.desc.nodes.namedItem('Schema Annotation').value;
Regards
Bruce -
Hi!
Can we set the time when a tooltip should be show or from which setting of the os is this derived?
Regards
TorstenHi Torsten,
in java use can use TooltipManager.setInitialDelay(milliseconds) so influence this, Maybe you can build a small bean which is included in your starting form to set this (didn't test this). -
Userexit_field_modification in MV45AFZZ
Hi ABAP-gurus,
I´ve used the above mentioned userexit to make a field editable.
The field is VBAP-KTGRM.
How I can store the entered content of this field?
I thought that I can use userexit_move_field_to_vbap in the same include but it seems that the entered values get lost when I leave the dynpro.
Any hints?
Thanks,
TobiasHi,
I still do not have my desired solution.
I can not work with userexit_move_field_to_vbap because this userexit is called at the begin of creating a sales document.
With Userexit_field_modification I still have the problem that I loose the value in VBAP-KTGRM when I leave the dynpro.
My coding Inside Userexit_field_modification:
CASE screen-name.
WHEN 'VBAP-KTGRM'.
Set to INPUT on when in Create or Change mode
IF ( t180-trtyp = charh OR t180-trtyp = charv ).
screen-input = 1.
ENDIF.
ENDCASE.
These code lines make the field editable but I see no chance to save the entered value of VBAP-KTGRM.
Thanks again,
Tobi -
Set a tooltip for a shape, not a button
Hi everybody,
Hope you are all ok wherever you are :)
I have this little problem guys; I want to set a tooltip button in my application but the problem is that i'm not using buttons but shapes instead, in which shapes i've added mouse click handle code.
I need when the mouse goes over these shapes-buttons i have, some tooltip text to be displayed. I've tried to create a rectangle and display the small text i want into that rectangle and then call repaint for restoring the program to the previous state before the tooltip display, but unfortunately it is too slow.
Can you please help me out of that? Can you give a way of setting tooltips for shapes instead of buttons?
Any help would be appreciated.
Thanks,
-JohnYour trying to set a tooltip for a given area on some JComponent defined by a Shape which holds the points that make up the border of the Shape, like GeneralPath or something like that? Is that what you mean? I'm not sure but I think you can use Shape.contains(Point2D ...) without actually have drawn the Shape, so that you can test where the mouse is on your JComponent, then check contains to see if a tooltip needs to be displayed. You'll have to write your own tooltip frame that's not dependent on a JComponent, but thats fairly straightforward. Don't know if this is any help to you, but its a possibility.
Tom
ioannisc: the OP talks about the use of Shape's, where did subclasses of JComponent come into it?! -
How set location for tooltip text ??
hi ,
i want to set tooltip location myself to a button . for this i override methods are
1. public String getToolTipText(MouseEvent e)2 public Point getToolTipLocation(MouseEvent e)here is code... where i have to change to set location for tooltip
* DebugGraphicsTest.java
* Created on April 28, 2005, 1:14 AM
package swingtest;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
* @author Paramasivam
public class DebugGraphicsTest extends javax.swing.JFrame {
public DebugGraphicsTest() {
initComponents();
MyButton btn = new MyButton("Chem m e");
btn.setToolTipText("this is actual");
getContentPane().add(btn);
jButton1.setToolTipText("button 1");
jButton2.setToolTipText("button 2");
jButton3.setToolTipText("button 3");
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
getContentPane().setLayout(new java.awt.FlowLayout());
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jButton1.setText("jButton1");
jPanel1.add(jButton1);
jButton2.setText("jButton2");
jPanel1.add(jButton2);
jButton3.setText("jButton3");
jPanel1.add(jButton3);
getContentPane().add(jPanel1);
pack();
* @param args the command line arguments
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new DebugGraphicsTest().setVisible(true);
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JPanel jPanel1;
// End of variables declaration
class MyButton extends JButton{
public MyButton(String s){
super(s);
public Point getToolTipLocation(MouseEvent evnt){
return new Point(100,300);
public String getToolTipText(){
return "hihi";
public String getToolTipText(MouseEvent me){
return "event hihi";
}Adding the line ToolTipManager.sharedInstance().registerComponent(this); to MyButton's constructor seems to solve the problem.
Maybe you are looking for
-
How do I get music already on my laptop into my itunes account library? I have just done the icloud match thinking this would pick them all up, but it hasn't, all it has done is match the 40 songs I already have in my itunes library. I wanted to get
-
I'm new to Mac and just wondering how I cut and paste, I know how to copy and paste.
-
Data Warehouse Oracle Database design approach
Our Project has a huge Fact (F1) with 38 GB data (75 Millions records) associated with three other dimensions D1 (with 7 million records) D2 (with 0.5 million records) D3 (with o.3 M records On these dimensions, we have few discrete valued attributes
-
Ever since updating Firefox/Mac to v.22, the built-in Firefox PDF viewer won't open PDFs. Any PDF link automatically downloads the file. I've set the Applications control for PDFs to "Preview in Firefox". I've also reset the mimeTypes.rdf file, but n
-
Photoshop Elements 12 and windows 8.1 problems
Hi folks...I purchased a new Dell Computer with Windows 8.1 and had added the Adobe Photoshop Elements 12 to the system Upon activation, the Photoshop program worked for 2 days, then I received a message that said "Photoshop Element 12 Editor has st