A Grow Box for a JFrame

I am this >||< (font size 8) close to getting this JGrowBox class thing to work exactly the way I want it to, and then, everybody can have a nice little grow box thingie to "attatch" to their JFrames. Ooooh.
I have three problems. First, if the user tries to resize the frame normally (grabs the very corner of the JFrame) then the JFrame resizes in its normal ugly way, without repainting its components (which means that the JGrowBox thing just stays where it is, which looks stupid.) Second, if the user grabs the actual JGrowBox the way you can with all other stupid Windoze programs, the JFrame flickers horribly, and the CPU goes nuts. Third, I use static byte array representations of the GIF images. This is kinda lame. I'm guessing all the cool Java widgets use Java2D somehow.
The dimensions used for the customized JComponent are specific to the arrangment of the rest of the layout. The JGrowBox is actually in the BorderLayout.EAST of a 18-pixel tall JPanel "status bar" thingie, which is in the BorderLayout.SOUTH of the contentPane. I didn't feel like going through the hassle of getting the thing to be universally positioned at the bottom-right of the parent JFrame, regardless of layout.
The images are just a 16x16 screen captures of the Windows 2000 and Windows XP grow boxes, respectively, with the window grey replaced with black and black set as the transparent color, and then sort of converted into a static byte array. I suppose it might be a bit more space-saving to just use Java2D to draw out all the pixels and stuff, but I hate doing that kinda crap.
Code:
* JGrowBox.java
* Created on July 28, 2005, 1:54 PM
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import javax.swing.*;
import javax.swing.event.*;
* @author [email protected]
public class JGrowBox
    extends JComponent {
    // the associated JFrame window parent of the grow box
    private JFrame parent = null;
    // where the user clicked the mouse to resize using the grow box
    private Point p0 = null;
    // the image of the grow box thinga-ma-jigger
    private Image image = null;
    /** Creates a new instance of JGrowBox */
    public JGrowBox(final JFrame parent) {
        this.parent = parent;
        // get the name of the operating system
        String OS_NAME = System.getProperty("os.name");
        // anybody got GIFs for KDE or GNOME?
        if (OS_NAME.equals("Windows 2000")) {
            image = new ImageIcon(WINDOWS_2000_GROW_BOX.BYTES).getImage();
        else if (OS_NAME.equals("Windows XP")) {
            image = new ImageIcon(WINDOWS_XP_GROW_BOX.BYTES).getImage();
        // this stuff is specific to a given arrangement
        setSize(new Dimension(18, 15));
        setPreferredSize(new Dimension(18, 15));
        setMaximumSize(new Dimension(18, 15));
        setMinimumSize(new Dimension(18, 15));
        setFocusable(false);
        // getting the first mouseClick and changing the cursor and stuff
        addMouseListener(new MouseAdapter() {
            public void mouseEntered(MouseEvent e) {
                parent.getContentPane().setCursor(Cursor.getPredefinedCursor(Cursor.SE_RESIZE_CURSOR));
            public void mouseExited(MouseEvent e) {
                parent.getContentPane().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
            public void mousePressed(MouseEvent e) {
                if (e.getButton() == MouseEvent.BUTTON1) {
                    p0 = e.getPoint();
            public void mouseReleased(MouseEvent e) {
                if (!contains(e.getPoint())) {
                    parent.getContentPane().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
        // when the user drags the mouse, resize the parent JFrame (ugly!)
        addMouseMotionListener(new MouseMotionAdapter() {
            public void mouseDragged(MouseEvent e) {
                Point p1 = e.getPoint();
                parent.getContentPane().setCursor(Cursor.getPredefinedCursor(Cursor.SE_RESIZE_CURSOR));
                Rectangle bounds = parent.getBounds();
                int x = bounds.width + (p1.x - p0.x);
                int y = bounds.height + (p1.y - p0.y);
                Point p2 = new Point(x, y);
                int xMax = Toolkit.getDefaultToolkit().getScreenSize().width;
                parent.setSize(Math.min(p2.x, xMax), p2.y);
        // hide the grow icon when the parent window is maximized
        parent.addComponentListener(new ComponentAdapter() {
            public void componentResized(ComponentEvent e) {
                if (parent.getExtendedState() == JFrame.MAXIMIZED_BOTH) {
                    setVisible(false);
                else {
                    setVisible(true);
    public void paintComponent(Graphics g) {
        if (image != null) {
            g.drawImage(image, 3, 3, this);
    public boolean contains(Point p) {
        Rectangle r = getBounds();
        return (p.x >= 0 && p.x <= r.width &&
                p.y >= 0 && p.y <= r.height);
class WINDOWS_2000_GROW_BOX {
    public final static byte[] BYTES = {
  71,   73,   70,   56,   57,   97,   16,    0,   16,    0,   -9,    0,    0,    0,    0,    0,
  -1,   -1,   -1,  -44,  -48,  -56, -110, -116, -106, -100, -102,  -69,    0,    0,   -1,    0,
   0, -128, -118, -103,  -35,  115,  126,  -96,   10,   36,  106,   10,   35,  103,    9,   32,
  95,   11,   37,  107,   13,   39,  109,   35,   54,  106,   10,   36,  105,    8,   27,   77,
  12,   39,  108,   14,   40,  109,   15,   42,  110,   15,   41,  110,   16,   42,  111,   17,
  44,  112,   17,   43,  112,   18,   45,  113,   19,   46,  114,   20,   47,  115,   15,   35,
  84,   21,   48,  116,   21,   48,  115,   22,   49,  116,   23,   50,  117,   24,   51,  118,
  25,   52,  119,   27,   54,  120,   28,   55,  121,   29,   56,  122,   30,   57,  123,   31,
  58,  124,   32,   59,  125,   34,   61,  126,   36,   63, -128,   37,   64, -127,   38,   65,
-126,   30,   58,  123,   32,   60,  125,   33,   61,  126,   34,   62,  127,   39,   67, -125,
  41,   70, -123,   40,   68, -125,   41,   69, -124,   42,   70, -123,   43,   71, -122,   44,
  72, -121,   45,   74, -120,   45,   73, -120,   46,   75, -119,   47,   75, -118,   48,   77,
-117,   49,   78, -116,   48,   76, -118,   50,   79, -115,   51,   80, -115,   52,   81, -114,
  53,   82, -113,   54,   83, -112,   54,   83, -113,   55,   84, -111,   56,   85, -110,   56,
  85, -111,   57,   86, -110,   58,   87, -109,   59,   88, -108,   60,   89, -107,   61,   91,
-106,   61,   90, -107,   62,   91, -106,   63,   93, -104,   63,   92, -105,   64,   93, -104,
  65,   94, -103,   66,   95, -102,   67,   96, -101,   68,   98, -100,   69,   99,  -99,   68,
  97, -101,   70,  100,  -99,   72,  102,  -97,   71,  101,  -98,   73,  104,  -96,   73,  103,
-96,   74,  104,  -95,   75,  105,  -94,   76,  107,  -93,   77,  108,  -92,   77,  107,  -92,
  76,  106,  -94,   78,  109,  -91,   79,  110,  -91,   80,  111,  -90,   82,  113,  -88,   81,
112,  -89,   83,  114,  -87,   84,  115,  -86,   85,  116,  -85,   87,  118,  -84,   89,  120,
-82,   88,  119,  -83,   90,  121,  -81,   89,  120,  -83,  105, -115,  -53,   91,  123,  -80,
  93,  125,  -78,   92,  123,  -80,   91,  122,  -81,   93,  124,  -79,   95,  126,  -77,   94,
125,  -78,   96,  127,  -76,   97, -128,  -76,   98, -126,  -75,   98, -127,  -75,  100, -125,
-73,  100, -124,  -73,   99, -126,  -74,  101, -123,  -72,  103, -121,  -70,  102, -123,  -71,
102, -122,  -71,  105, -119,  -68,  104, -120,  -69,  107, -117,  -67,  106, -118,  -68,   31,
  59,  102,   36,   64,  104,  107, -116,  -66,  108, -115,  -66,  110, -113,  -64,  109, -114,
-65,  112, -111,  -62,  111, -112,  -63,  113, -110,  -61,  112, -112,  -63,  114, -109,  -61,
116, -107,  -59,  115, -109,  -60,  115, -108,  -60,  118, -105,  -57,  117, -106,  -58,  120,
-103,  -55,  119, -104,  -56,  121, -102,  -54,  119, -104,  -57,  122, -101,  -54,  121, -102,
-55,  124,  -99,  -52,  123, -100,  -53,  125,  -98,  -51, -117,  -83,  -32,   72,  124,  -61,
126,  -96,  -50,  124,  -99,  -53,  126,  -97,  -51, -127,  -93,  -48, -128,  -95,  -49, -125,
-91,  -46, -126,  -92,  -47, -123,  -89,  -44, -124,  -90,  -45, -121,  -87,  -42, -122,  -88,
-43, -118,  -84,  -40,  106,  -98,  -36,   97, -119,  -72, -123,  -85,  -38, -120,  -85,  -41,
-117,  -82,  -39, -119,  -84,  -41, -114,  -80,  -37, -115,  -81,  -38, -116,  -82,  -39, -112,
-77,  -35, -113,  -79,  -36, -110,  -75,  -33, -111,  -77,  -34, -111,  -76,  -34, -107,  -72,
-30, -108,  -73,  -31, -109,  -74,  -32, -106,  -71,  -30, -107,  -72,  -31, -104,  -69,  -28,
-105,  -70,  -29, -102,  -67,  -26, -103,  -68,  -27,  109,  -93,  -34, -100,  -65,  -25, -101,
-66,  -26, -102,  -67,  -27,  -97,  -61,  -22,  -98,  -63,  -23,  -98,  -62,  -23,  -99,  -64,
-24,  -95,  -59,  -20,  -96,  -61,  -21,  -93,  -57,  -18,  -95,  -60,  -21,  -93,  -58,  -19,
-97,  -73,  -46,  -95,  -72,  -46,   45,   88, -126,   74,  122,  -87,  -94,  -58,  -20,  -91,
-55,  -17,  -90,  -54,  -16,  -70,  -52,  -34,   78,  -99,  -29,   74, -114,  -51,  109,  -71,
  -9,  -85,  -52,  -25, -124,  -81,  -47,   65, -115,  -62,  124,  -78,  -40,  -86,  -43,  -12,
-77,  -63,  -53,  105, -127, -113,   67,  -98,  -51,   73,  -86,  -38,  103,  -74,  -33,   77,
-70,  -21,  104,  -57,  -23,  -72,  -27,  -13, -127,  -45,  -23, -104,  -33,  -13,  -61,  -18,
  -6, -111,  -36,  -16, -101,  -49,  -37, -101,  -34,  -25,  127,  -47,  -37,  -85,  -27,  -40,
-111,  -28,  -65,  -99,  -21,  -57,    0, -128,    0,  -48,   -8,  -51,   -1,   -1,    0, -128,
-128,    0,  -69,  -73,  -97,  -83,  -99,  105,  123,  110,   81,  -87,  -91, -100,   -1,    0,
   0, -128,    0,    0, -110, -118, -118, -128, -128, -128,   64,   64,   64,   33,   -7,    4,
   1,    0,    0,    0,    0,   44,    0,    0,    0,    0,   16,    0,   16,    0,    0,    8,
  59,    0,    1,    8,   28,   72,  -80,  -96,  -63, -125,    8,   19,    6,   72,   88,   48,
-128,   63, -122,    3,   29,   62, -124,   40,   17,   34, -128, -118,   11,   21,   -6,  123,
-24,   80,   35,  -57, -115,    8,   49, -126,   60,   40, -110,  -93,  -63, -110,   23,   39,
  70,    4, -119,  114,  -27,  -57, -105,   22,   99,   50,   12,    8,    0,   59
class WINDOWS_XP_GROW_BOX {
    public final static byte[] BYTES = {
  71,   73,   70,   56,   57,   97,   16,    0,   16,    0,   -9,    0,    0,   -8,  -70,   43,
-45,  -94,  -97,    0,   90,  -20,  -39,  -39,  -40,    2,  106,   -2,  -26,  111,   82,  113,
111,  100,  -11,  -11,  -15,  -14,  -14,  -18,  121,  -98,  -66,  -52,  -51,  -53, -111, -103,
-48,  111,  114,  -78,  -83,  -80,  -45,  -13,  -21,  -76,  -30,  -36,  -53,  -74,  -57,   -8,
   0,    0,    0,    1,  -79,    3,  -39,  -30,   -7,  -98,  -74,  -41,  -36,   10,   25,   73,
124,  -10,   -2,   -5,  -11,  -32,   77,   47,    0,   75,  -30,  -91,  -90,  -91,  -28,  -24,
  -8,  101,  -79,   -8,   53,  112,  -12,   83, -118,   -9, -110,  -44,   -8,  -84,  -88, -103,
   1,   19, -117,   62, -106,   -1,  -17,  -19,  -34,    3,  101,  -15,   33, -105,  -76,  -82,
-70,  -19,  -77,  -14,   -5,   -7,  -56,   76,    0,   90,  -12,  -15,  -17,  -30,  -44,  -37,
  -8,  120,  -56,  -21,   20,   72,  -69,    0,  -98,  -57,    0,   60,  116,  -65,  -63,  -65,
   1,   68,  -48,    1,  -37,    0,   81,  -90,   -8,  -74,  123,    0,  -28,  -28, -109,  -51,
-42,   -7,  -59,  -59,  -59,   -8, -103,  116, -105,  -78,  -17,  -97,  -95,  -98, -122, -119,
-65,  -10,  -84,   76,   75,   75,   74,    1,   67,  -49, -122, -126, -122,    3,  113,   -1,
   8,   85,  -35,  104, -107,  -11, -100, -103, -100,  -33,  -33,  -35,    0,   30,  -95,  -86,
  47,   10,  -20,  -23,  -40,  -38,  -43,  -61,   -7,   -7,   -7,  -35,  -75,  -59,   44,   44,
  43,  -17,  -18,  -13,   43, -112,   -1,    0,   61,  -36,   98,   98,   98,  -63,  -59,  -27,
  -3,  -49,  108,    6,   44,  -86,  -45,  -59,  -80,   -2,   -3,   -6,  -28,  -27,  -28,   50,
106,  -63,  -79,  -77,  -80,  -61,  -49,   -7,   85,  -68,  -44,  -16,  -45,  -18,   35,   89,
111, -104,  -49,  -52,   53,  -84,  -56,  -86,  -85,  -69,    0,   88,  -26, -113, -115, -114,
  65, -110,  -89,   74,  -83,   96,  -70,  -70,    0,  -77,  118, -111,   -5,  -17,  -41,  -14,
-13,   -8,  -19,  -21,  -26,   21, -124,  -24,  -45,  -41,  -19,    0,   72,  -15,  124,  121,
119,  -94,  -98, -105,   22,  106,  -18,  -28,  -12,   -5,  -21,  -52,  -67,    6, -124,   92,
  -4,  -36, -111,    0,   85,  -22,  -99, -106,  -74,  -54, -114,   82,    0,   83,  -31,   97,
-85,  -70,  -37,  -35,  117,  -19,  -28,  -58,   -5,   -9,  -12,  120,  -72,  -53,   18,  -92,
-55,   -1,   -1,   -1,   81,  -22,   70, -112,   -7, -123,    7,   49,  -39,  105,   40,   19,
-11,   -4,   -5,   -5,  -10,  -20,  -72,   94,  108,    3,   54,  -66,  -71,  -71,  -70,  120,
-84, -121,    1,   97,  -21,    8,   49,  -39,  -24,  -25,  -25,  -55,  -49,  -22,  -11,  -13,
-27,   -5,  -62,   59,   32, -122,   -2,    0,   54,  -21,    7,  120,  -92,  105, -107,  -52,
  36,  106,  -11,  -20,  -20,  -18,   -5,  -10,  -25,   34,  120,   -7,    0,   25,  -49,  -69,
-67,  -36,   27,   94,  -27,   80, -102, -100,  -23,  -70,   83,  -21, -124,   89,    2,  107,
-12,   80,  -80,  -90,  106, -114,  -96,   44,   89,  -60,    1,  100,   -7,    0,   81,  -27,
  -8,   -7,   -3,  -46,  -61,  -37,    0,   38,  -59,  -72,  -76,  -94,  -25,  -31,  -37,   39,
  96,  -27,   -6,  -63,   14,   -4,  -13,   -3, -109,  -92,  -73,    0,   38,  -45,   41, -103,
-56,   27,   90,  -15,  -59,  -39,  127,  -74,  -67,  -68,   23,   85,  -33,   15,   92,  -25,
  10,  102,  -12,   -2,  -20,  -22,  -23,  -26,  -33,    3,   62,  -56,    6,   77,  -42,  -16,
-16,  -21,    4,   84,  -25,  -24,  -27,  -45,   -4,   -4,   -5,    0,   55,  -45,  -96,  -64,
  43,    0,   85,  -27,   -1,  -17,  -53,  -33,  -28,  -50,    6,   88,  -28,  -31,  -26,  -24,
   0,   96,   -8,    0,   84,  -29,    0,  101,   -3,   -9,  -17,  -25,    0,   96,   -4,  -57,
-53,   45,   -2,   -5,  -18,   -2,   -2,   -2,  -64,  -70,  -84,   63,   64,   61,  -11,  -12,
-36,  -48,  -44,   80,  -69,  -85,  -66,  -60,  -58,   30,    0,  123,    2,    1,  114,  -34,
  -5,   -5,  -27, -110, -111, -107,   -9,  -21,  -32,  -97, -105, -127,   -6,  -23,   78,   -7,
-26,   96,   58, -104,  -26,  -46,  -45,  -46,   42, -107,  -22,   -4,   -4,   -1,   -1,   -1,
-83, -112,   -1,   -1,   50, -119,   -3,   32,   45,   52,   17,   20,   18,  108,  108,  108,
-40,  -68, -113,   73, -123,  -43,   33, -115,  -34,  -15,  -14,  -23,   70,  -87, -109,  -13,
-29,  -30,   21,  126,  -32,    3,  104,   -6,   -3,   -2,   -2,  -65,  -36,  -57,   21,  111,
  -9,   -1,   -2,   -3,   37,  -20,   32,   17,   78,  -33,  -21,  -24,  -32,   11,  104,   -9,
  14,   80,  -19,   -8,   -4,   -3,   -2,   -5,   -5,  -42,  -48,  -59,  -11,  -11,  -22,  -48,
-33, -107, -122, -112,  105,  112,   89, -118,  -21,  -24,  -40,  126,  -92,  -14,  -97,  -96,
-53,  -33,  -62,  -24,  -49,  -79,   59,  127,  109,   76,    7,   79,  -22,   33,   -7,    4,
   1,    0,    0,   17,    0,   44,    0,    0,    0,    0,   16,    0,   16,    0,    0,    8,
  61,    0,   35,    8,   28,   72,  -80,  -96,  -63, -125,    8,   19,   42,   36,   72, -118,
-44,  -62, -127,   13,   -7,   60,   20,  -56,   71,  -30,  -60, -123,   13,    5,  102,   76,
  24,   49,   66,  -57, -124,   21,   41,   90,  -68,   88,  112,  -93,   73, -121,   37,   73,
  73,  -20,   -8, -111,   96,  -56,    8,   47,   95, -110, -100,   25,   33,   32,    0,   59
}

Yes, <expletive deleted>, I know what Google is.You need to calm down.I was perfectly calm. You're the one saying "Oh, but maybe you don't know what a "google" is.", which intended or not, sounds like you're calling me a jackass for not looking it up myself. Nevermind the fact that you said in the post before that that you didn't even know what it was called. So why should I assume that searching the web for "grow box" is going go give me any results at all that have to do with what you're trying to do?
Hmm, perhaps you are just being argumentative, and
wasting my time, but I'll assume that there are
enough people out there like you who don't understand
what the purpose of that doohickey in the southeast
corner of a window is to make responding to your
questions worth my time. I'm not doing it to waste your time. I'm quite sure I've never seen what you linked to on an application before. At least not like what that link showed. If you had said, for example, like Internet Explorer has that little larger box in the lower right corner which acts as a larger handle for window resizing, then I might have understood you from the start.
By the way, are you
suggesting by your question that it is perhaps
unnecessary to fulfill the expectations of the end
user with respect to the graphical user interface of
a Java program, just because the given defacto Java
component already has very nearly the bare minimum
functionality expected of a comparable gui component
that can be found in any other relatively advanced
development kit?I would expect that a frame-like container component that supports manual resizing by the user would supply some location to click to initiate that resize. How is up to the component.
Okay, so why would you need a handle to resize the
frame?
Reason #1: Because it aids the user in resizing the
window. It's a bigger, albeit not by much, area on
the screen for which the user can aim for in the
mouse movement action to "grab" onto a portion of the
current window in order to resize it, reducing the
amount of time wasted on window arrangement.As mentioned above, if something like what IE has, or Netscape or FireFox has in the lower right, then fine.
Reason #2: Because I'll bet you dollars to donuts
that the web browser you are using right now to view
this rapidly decaying topic has one. Shouldn't your
program be at least as good as, say,
IExploder? Why not at least try to make your
Java program seem like it didn't just fall off the
Swing turnip truck?I wouldn't use the terms "at least as good as" and IE in the same sentence. But that's just me. But as I mentioned above, I don't think you were clear on what you were talking about.
You started by saying "grow box" like this was some common name for something assuming everyone would know what you were talking about. Then when asked, you admitted you didn't know what it was really called, which as mentioned, I think precludes one from "googling" that term, as the results, IMO, can be assume to not necessarily be what you are talking about. Then you post a specific link to a site that you say is more or less what you have in mind, but that's refering to very old Mac applications as an example, instead of (as in your most recent post) just refering to a very common modern application as an example.
Reason #3: Because, maybe it looks cooler that way.
I mean, geez, man. You don't have to
o use it. It was just an idea. Gawd.I think you need to calm down. If you can't be more clear initially what you're talking or give modern references to site examples, then you shouldn't expect everyone on a text-only forum can read your mind and figure out what you really are looking for.
Addressing the second problem I was having with this
class, adding this line:
System.setProperty("sun.awt.noerasebackground",
ound", "true");
gets rid of the flicker, but not the performance hit.
Got this from the misnamed not_a_genius in "Re:
: Transparent windows."
(http://forum.java.sun.com/thread.jspa?threadID=391403
&messageID=3067048#3067048).http://www.javadesktop.org/forums/thread.jspa?threadID=6437&tstart=15
You basically are either going to have to live with the performance hit or the flicker, from what I can see. At least til Java 6 next year. Or you can check
https://swinglabs.dev.java.net/
and see if they have a fix that is backwards compatible with Java 1.5. I thought I heard said that they made something available to fix the "gray rectangle" problem... I could be wrong about that, though.
Anyway, for real info, you can read thru:
http://weblogs.java.net/blog/chet/archive/2005/04/swing_update_no_1.html

Similar Messages

  • How can I reinstate the warning dialog box for entering a secure site?

    I would like to reinstate the warning box that tells me when I am entering a secure site. The one that warns when I am leaving a secure site is working just fine. I probably unchecked the box for entering at one time or another but I can't find how to bring it back.

    Looks that the Warning Messages dialog for those settings is gone from Tools > Options > Security
    You can reset the related <b>security.warn_</b> prefs on the <b>about:config</b> page.

  • Check Box for each row in report -- all rows deleting when pressing DELETE

    Hello experts! I have set up a report with a check box for each row. When I click the DELETE button to delete the selected rows, every single one of the rows get deleted...even the ones that are not selected. I have my process point set to "On Submit - After computations and validations".
    This is my delete process (SHG is the table and SHG_ID is the primary key):
    FOR i in 1..HTMLDB_APPLICATION.G_F01.count
    LOOP
    DELETE FROM SHG
    WHERE SHG_ID = HTMLDB_APPLICATION.G_F01(i);
    END LOOP;
    Also, I've added to query in the region source this line:
    htmldb_item.checkbox(1, SHG_ID) del,
    Where does the "1" come into this? Not sure what I am doing wrong!
    Message was edited by:
    user477193
    Message was edited by:
    user477193

    The 1 (first argument to all the htmldb_item.* APIs) corresponds to the array number in htmldb_application.g_fNN. So 1 will populate array g_f01, 2 will populate g_f02 and so on.
    Your code seems fine, it should delete only the checked rows. Are you sure there is no other process on the page that might be deleting the rows? See if you can put up an example on htmldb.oracle.com

  • Add List box for one field in ALV GRID

    Hi All,
      I need to add drop down list box for one field in ALV Grid.
      If any body knows, please help.
    Thanks in advance.
    Regards
    Manglesh

    Hi,
    Here is the ex where i have used for date parameter in the sel screen
    type-pools: vrm.
    data: name type vrm_id,
          list type vrm_values,
          value like line of list.
    parameters :    p_date like p_date2
                                  as listbox visible length 15.
    at selection-screen output.
      name = 'P_DATE'.
      value-key = '1'.
      value-text = 'Today'.
      append value to list.
      value-key = '2'.
      value-text = 'Last 7 days'.
      append value to list.
      value-key = '3'.
      value-text = 'Last 30 days'.
      append value to list.
      value-key = '4'.
      value-text = 'Last 90 days'.
      append value to list.
      value-key = '5'.
      value-text = 'Last year'.
      append value to list.
    Call the ''VRM_SET_VALUES' to display the values in Listbox
      call function 'VRM_SET_VALUES'
        exporting
          id     = name
          values = list.
    at selection-screen.
      if sy-ucomm = 'CLI1'.
        sscrfields-ucomm = 'ONLI'(001).
      endif.
      if p_date = '1'.
        p_date11 =  sy-datum .
      elseif p_date = '2'.
        p_date11 = ( sy-datum - 7 ).
      elseif p_date = '3'.
        p_date11 = ( sy-datum - 30 ).
      elseif p_date = '4'.
        p_date11 = ( sy-datum - 90 ).
      elseif p_date = '5'.
        p_date11 = ( sy-datum - 365 ).
      endif.
    Hope this helps u..
    Please reward points if useful.
    Regards,
    Sreenivas

  • Print Dialog Box for Addon is not showing in Terminal Server

    Dear All,
    I have created a addon for Automatic Sales Invoice printing that prints the crystal report directly to the printer bu opening a
    print dialog box for printer selection through SDK code.
    The Same addon works fine on the server with print dialog box being showing through SDK code.
    But while running on Terminal Server , print dialog box is not showing any printer though printers are redirected to that
    terminal server.I am not getting whether the problem is in my addon or in the terminal server printer settings.
    Please suggest as i need to know the reason urgently.
    Thanks
    Amit

    Hello Edward,
    Thanks for your reply .
    But the problem is that while running on normal server the print dialog box appear with the printer name in my addon for printer selection .
    But while using terminal server , the print dialog box is not getting any printer in the dialog box .That's the major concern for me
    is their any way to check that why the printers are not showing in print dialog box.
    Thanks ,
    Amit

  • Using Item UIDRef, can we get data as set in "text on path option" dailog box for each "text on path" item

    Hi all,
    I have a Item UIDRef but facing a problem for getting data as set in "text on path option" dailog box for each "text on path" item.
    What I did:
    - Getting the  pointer "IMainItemTOPData" using item UIDRef as
      InterfacePtr<IMainItemTOPData> mainItemTOPData(shapesUIDRef, UseDefaultIID());
    - This interface has the method GetTOPOptionData () which return ITOPOptionsData pointer
    - But SDK don't have "ITOPOptionsData" class implementation.
    Second Approch:
    - Used "ITextOnPathSelectionSuite" and getting the correct result for Desktop plugin.But I want the correct result in server plugin also.
    Anyone who has an idea how to get this using UIDRef, please let me know.
    Regards,
    Jitendra Kumar Singh

    Hi Pulse,
    Unfortunately, Flex doesn't currently support text on a path. However, I binged it and found this:
    http://blog.tsclausing.com/post/49
    That might be useful.
    -Adam

  • After upgrading to Lion should I have tatty grey screen on opening with boxes for password user?

    After upgrading to Lion on Wednesday last I now have a tatty grey screen on booting-up with the two boxes for user name and password.Gone is the old blue screen. Does anyone else have a grey opening screen?
    Also this evening on booting the grey screen appeared but I could not immediately type any info into either box.After switching on/off several times I gave up and left the iMAC on with an inactive grey screen.About five minutes later the HP printer went through a re-calibration or cleaning process,of its own accord, and I noticed that the cursor on the screen had moved of its own accord.I then found that I could insert info into the two boxes and here I am with the iMAC open.Anone come across this issue?

    Hello again Gary,
    After trying your PRAM suggestion, everything was OK however, when I restarted my iMac the next day, the same Grey Screen apppeared whith the request for user name and password?
    This has repeated for the last 3 days!
    I have tried the Utility to check the HD "Verify Disk Permissions" which shows a long list of "faults"? and I have done this twice now.
    Also I have to do the PRAM start-up in order to get online and use other programs. I get frequent messages that say my "Applications" are for the wrong OS?
    After using the PRAM keyboard start-up I get a screen with a "Bar" similar to the Windows XP start-up proocess and a grey blob moves along this "Bar" until the iMac starts.
    On one site it mentioned that this iMac may need an "Firmware" update/correction; however I can not find any Firmware to download for this machine.
    My iMac is a 21.5" Model A1311. 
    Do I need to do a complete Format of the HDD and re-install Leopard and then try Lion again?
    Very frustrated,
    Maureen

  • I am running OS10.6.8 and have a mail box duplication. I use gmail and when I open my mail I have both the Apple Mail and another set of boxes for Gmail. Both get all mail and when I delete from one, it deletes from the other. How can I get rid of the dup

    I am running OS10.6.8 and have a mail box duplication. I use gmail and when I open my mail I have both the Apple Mail and another set of boxes for Gmail. Both get all mail and when I delete from one, it deletes from the other. How can I get rid of the dup

    Hi,
    According to your descriptioin, I don't think this is system problem, it should be Intel driver problem. It would be contact Intel to confirm this issue whether this is their driver problem.
    Roger Lu
    TechNet Community Support

  • Good morning a few weeks ago  I send the request for the replacement program of my ipod nano 1st generation and they sent me the shipping box but I did not get the label to go back,  and I can not  return it , i need to you sent me again the box for retu

    Good morning a few weeks ago  I send the request for the replacement program of my ipod nano 1st generation and they sent me the shipping box but I did not get the label to go back,  and I can not  return it , i need to you sent me again the box for return the ipod

    Best thing would be to call Apple up again, and let them what has happened and they'll help you!

  • Free Youview box for new BT infinity customers

    Does anyone know how to get the free youview box for new BT infinity customers?   Ordered new service on 12th Dec and called in later to check how/when I'll get the Youview box.  The CSR told me that I had to call after the broadband was installed to arrange to get the box and I would have to pay £5/mo for the TV service but according to the BT site, it's supposed to be free for BT infinity customers and £5/mo for other broadband customers (+ the £49 activation fee for all customers).
    As I understand it, the offer ends 31st Jan but my infinity broadband is not scheduled to be installed until this Friday, 1st Feb (after a whole lot of aggravation, wasted time, incorrect info and failed follow-up by various BT reps).  I'm afraid if I call in afterwards, I'll be told that I missed the deadline to get the box and/or I have to pay the monthly fee even though I'm a BT infinity customer.
    Since BT phone reps have been unreliable, can anyone provide info on this?  Thanks for your help 

    I wasn't aware I had to do this when I signed up.  So you're saying even though my line isn't installed yet and I'm a new customer, there's no way to get this if I didn't add this at the time of order even though I know this offer was active when I signed up?  When I signed up, there wasn't an option to add free TV service for 12 months for Infinity so I didn't add the service offered at £5.  Would BT really use loopholes and technicalities to avoid providing something they've offered and put up billboards everywhere to promote? 

  • How do I drag an image or text box to the "workspace" off of my working file but where I can still see the image and text box for future use?

    How do I drag an image or text box to the "workspace" off of my working file but where I can still see the image and text box for future use?
    When I drag the item off of the trifold that I am creating, it just disappears but I still want to use it.  I just need to move it out of the way to modify other portions of the document.
    thanks,
    C

    Add another page below the current one to use as a storage area. You can't use the grey area around the page for storing items you want to use later.
    Go to the Pages Menu>Provide Pages Feedback if you would like to request this feature be added in future versions.

  • InDesign "Save As" dialog box for every operation in INDB book file; updating page numbers, etc.

    So I haven't used INDB files in awhile in InDesign, and today was the first time I attempted to adjust an old INDB (created originally with CS5).  For every operation of adjusting the book file, such as updating page/section number or adding/removing an INDD file I get a Save As dialog box for each constiuent INDD file.  This is quite annoying since the book has lots of INDDs, and I have to click through the tedious save as with each.  I previously worked with INDBs in CS5, and never encountered this, there was no need to save each INDD in the book just to update the page numbers.  I tried creating a new INDB in CS5.5 thinking that maybe it was because I was working from a file created with an older version of InDesign.  Does anyone know if there is a way to suppress the Save As dialog?  Another thing I noticed that is supremely frustrating is that this new build of InDesign doesn't default to saving the file in its original location, and I have unwittingly ended up saving files in other places, only to later realize it.  I am using InDesign CS5.5 Ver. 7.5.2 on Mac OSX 10.7.3  Any help is greatly appreciated. 

    It will only happen once (and frankly, what you are doing is a very bad idea).
    When you open the old book in CS5, you are converting to the new format. All of the legacy files also need to be converted, even if added to a new book in CS5.5, hence the Save As since ID will not overwrite the old versions until you tell it to (and that's the bad idea). I strongly recommend (though it's too late for any books you've already updated and overwritten) that you either continue to edit in the old version, or that you take the time to open each file in the original version if it's older than CS5, then export to interchange format (.inx or .idml, depending on version), open those files in CS5.5, save with new names so you don't overwrite anything, then add to a new book and proceed.
    One of the reasons I recommend this seemingly time-consuming approach is that there are too many reports (another one yesterday) of some sort of problem that pops up late in the editing cycle when converting legacy files to CS5/5.5 by opening them directly and saving. This is a belt and suspenders insurance approach, and is far less labor intensive than starting over, which might end up being your other option down the road if something goes wrong.

  • Change File Name In The "File Download" Dialog Box For Web Reports

    Hi All ,
    I followed the below note to change the "File Download" name.
    How To Change The File Name In The "File Download" Dialog Box For Web Reports? Doc ID: Note:418366.1
    However its not working. Has anyone tried this and works fine ?
    Basically I wanted to change the name "rwservlet" when a report is run in an
    excel format.
    Rajesh Alex
    Rajesh Alex

    Hello,
    Have you checked if a HTTP header "Content-disposition" is returned ?
    You can use ieHTTPHEaders for IE
    http://www.blunck.se/iehttpheaders/iehttpheaders.html
    and
    Live HTTP Headers for FireFox
    https://addons.mozilla.org/en-US/firefox/addon/3829
    Regards

  • The little icons to the left of website names (such as the little white 'f' in a blue box for Facebook) on my list of Bookmarks have disappeared so that I now only have the names themselves, which makes it harder to navigate.

    Normally, when I click on Bookmarks at the top of my screen, the list of websites that comes up includes a little icon to the left of each bookmark. Now I only get a list. No icons. What has happened to the little four-colored flag for Hotmail, the 'f' in a blue box for facebook, and all the rest? It's now much harder to navigate.

    Problem solved. Brilliant! Thanks.

  • How to handle the button "cancel" in a dialog box for displaying views?

    Hello!
    I ve a question about handling the cancel button in a dialog box for displaying views.
    I ve already implemented the dialog box by using the following code:
    METHOD eh_onnewqact.
      DATA stitle TYPE string.
      IF m_popup IS BOUND.
        stitle = cl_bsp_runtime=>get_otr_text( alias = 'ZCC_ICRM/NEW_TASK' )."cl_wd_utilities=>get_otr_text_by_alias( 'ZCC_ICRM/NEW_TASK' ).
        m_popup = comp_controller->window_manager->create_popup(
          iv_interface_view_name = 'ZCC_POPUP_NEWBT/NewQActWindow'
          iv_usage_name = 'CUNewQAct'
          iv_title = stitle
        CALL METHOD m_popup->set_on_close_event
          EXPORTING
            iv_view       = me
            iv_event_name = 'NEWQACT_POPUP_CLOSED'.
      ENDIF.
      m_popup->open( ).
    ENDMETHOD.
    My dialog box consists two buttons - cancel and create.
    The cancel buttons should close the popup and the create button should create an entity of a specified object. but let us come to the cancel button. I did´nt find any information about implementing an cancel button. So, how should I implement it? I thougt
    me->close( ). But that didnt works!
    Could u give me further information about that, because my cancel event-handler is empty?
    method EH_ONCANCEL_QACT.
    endmethod.
    After that I would know how my calling view could know that the user pushes the Create Button and how the data of 2 inputfields of the dialog box finds their way to the calling view in order to process this data there?
    Thank you very much!

    Hi Michael,
    thank you for your advice! This problem is solved...
    ...but I have another issue. Ive implemented 2 editable fields in my popup. The user should fill that fields with context and that context should be processed in the calling view of my popup.
    My question is how to transfer these information from my popup to my calling view or method?
    I tried the following...
          lv_context_node ?= m_popup->get_context_node( 'QUICKACT' ).
          IF lv_context_node IS NOT INITIAL.
            lv_text = lv_context_node->get_date( attribute_path = '' ).
          ENDIF.
    But it doesnt work! The context node object is always empty/initial.
    Thank you!
    PS: Another possibility could be that the object / node of the calling view is transferred to the pop-up in order to process it there.
    Edited by: Marcus Findeisen on Feb 22, 2011 12:13 PM

Maybe you are looking for

  • Can I use Home Sharing for this...

    I have 3 iphones (2 x 6's and 1 x 5), and an ipad, all of which I use one iTunes account. iTunes and Mac software all up to date Is it possible to use Home Sharing to sync them all exactly the same or is the a better/smarter way to do this. I have tr

  • A point to clear from note 823587.1

    Current Environment: ============= 2 Nodes ("Node-1" and "Node-2") for database tier. 2 Nodes ("Node-3" and "Node-4") for application tier. EBS Version: 12.1.3 Database Version (On "Node-1"): 11.2.0.3 We installed db on "Node-1" and apps on "Node-3"

  • Using SYPART01 IDOC for setting partner profiles from external system

    We wish to maintain our partner profiles from an external system. Is there any existing interface for doing this. It seems that the sypart message is only for output, not input. Any ideas or suggestions? Thanks! Dan

  • Do songs auto-download when played in iOS 7?

    Apple says "iOS devices will start playing tracks from iCloud as they download and will store them so that you can listen to them later even if you don't have a network connection," but that is not my experience. When I play a song, it is not added t

  • Airport vs third party Routers

    Is there a true advantage of using a Airport router vs. say Net gear Router?  If so why?? Thank you Wendy99