CP 9 CC switch with custom button?

Hello

How to use a button image / custom on-screen for DC switch on and outside? I Don t want to do through the play bar.

Is it possible to do?

Thanks for your help!

If you like with the PlayBar, you need a programmer. If you want to do it with a custom navigation and other buttons, take a look at:

1 share = 5 buttons toggle - Captivate blog

Here's an additional button that is not available on the default reading bars:

Replay (slide) button - Captivate blog

Tags: Adobe Captivate

Similar Questions

  • Switching with Boolean button meter/press/calendar status

    I would like to have a button (Boolean) change the State of several digital output lines (photo attached):

    A touch of the spirit, I want to create a short pulse (say 200ms) on lines 3 and 4 (simultaneously). After these 200ms, I want 1 line from the States (let's say it was OFF so far, switch on IT) and line 2 is the opposite (WE so far, go offshore). I want to press button to create this short pulse on lines 3 and 4 and switch on the line 1 and 2, States.

    This could be a simple VI, but I couldn't know. I want to go to a data acquisition (USB-6211).

    I hope I was able to explain it clearly.

    Thank you bery much


  • APEX dynamic Action issue with custom button template

    A new day and a new problem. -.-

    I wanted to create a dynamic action, if a button is clicked and got the error "the selected button uses a 'button model' which does not contain the #BUTTON_ID substitution string #. So I googled a bit und found issue with action Dynamics apex. I thought that this would solve my problem and I looked in the model button to find this:

    <table class="t15Button" cellspacing="0" cellpadding="0" border="0"  summary=""><tr>
    <td class="t15L"><img src="#IMAGE_PREFIX#themes/theme_15/button-l.gif" alt="" /></td>
    <td class="t15C"><a href="#LINK#">#LABEL#</a></td>
    <td class="t15R"><img src="#IMAGE_PREFIX#themes/theme_15/button-r.gif" alt="" /></td>
    </tr></table>
    

    A former colleague created the model itself and I do not know where to insert the #BUTTON_ID #. Does anyone have any suggestions?

    Concerning

    Chris

    Miss you atrribute button ID,

    is the correct code

    #LABEL#

    I hope this works.

    Go

  • Using switch and case with Radio buttons

    Can I use the case switch with radio buttons?

    What will be the parameter to determine the choice like xfa.event.newText is used for the drop-down list.

    Aditya

    Hi Aditya,

    Select the exclusion group in the hierarchy (you have no script each option button) and select the click event. The switch statement would use the this.rawValue.

    Hope that helps,

    Niall

  • I want to use a custom button photoshop with my composition and have the substitution effect

    I'm trying to put a button in photoshop in a blank publication widget trigger. When I cut an paste the image into the trigger, he loses his robot and switches are no longer the colors during the reversal. It works very well in the composition of the lightbox, but the problem with lightbox composition, is there no working capital options to display click only target. How to work around this problem. I want to have my own custom button with the effect of composition within the cc muse.

    You should check the design layout and defined States for relaxation, if the State is set correctly then it should show the rollover State, but the container target corresponding to the relaxation is on the page, then it could show you the active State not the rollover State.

    Thank you

    Sanjit

  • Problem with fieldChanged() and custom button field

    Hello

    I created a custom button class by extending LabelField.  I chose LabelField over field because the LabelField contains desirable properties that are already being implemented.  The only problem I'm having has to do with the change listener.  It seems to 'steal' the event click on other areas in my application.

    For example, when I click on the custom button, a popupscreen with a listfield opens. When I click on an item in the listfield, then the fieldChanged() of custom button is called again...

    Can you see anything wrong with my code?

    package com.rantnetwork.fields;
    
    import com.rantnetwork.app.Constants;
    import net.rim.device.api.system.Display;
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.Ui;
    import net.rim.device.api.ui.XYEdges;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.decor.BackgroundFactory;
    import net.rim.device.api.ui.decor.BorderFactory;
    
    public class CustomButtonField extends LabelField {
    
        private boolean highlighted = false;
    
        public CustomButtonField(String text, long style) {
            super(text, style | Field.FOCUSABLE | LabelField.ELLIPSIS);
    
            setPadding(10, 0, 10, 5);
    
            setFont(Font.getDefault().derive(Font.BOLD,
                    Constants.DEFAULT_FONT_SIZE, Ui.UNITS_pt));
    
            setBackground(BackgroundFactory.createLinearGradientBackground(
                    0x163d7c, 0x163d7c, 0x03162d, 0x03162d));
            setBorder(BorderFactory
                    .createBevelBorder(new XYEdges(1, 1, 1, 1), new XYEdges(
                            Color.BLACK, Color.BLACK, Color.BLACK, Color.BLACK),
                            new XYEdges(Color.BLACK, Color.BLACK, Color.BLACK,
                                    Color.BLACK)));
    
        }
    
        public int getPreferredWidth() {
            return Display.getWidth() / 3;
        }
    
        protected void paint(Graphics graphics) {
            graphics.setColor(Color.WHITE);
            super.paint(graphics);
        }
    
        protected void drawFocus(Graphics graphics, boolean on) {
            // Do nothing
        }
    
        protected boolean navigationClick(int status, int time) {
            fieldChangeNotify(1);
            return true;
        }
    
        protected void onFocus(int direction) {
            if (!highlighted) {
                setBackground(BackgroundFactory.createLinearGradientBackground(
                        0x4bb7df, 0x4bb7df, 0x1b96da, 0x1b96da));
                setBorder(BorderFactory.createBevelBorder(new XYEdges(1, 1, 1, 1),
                        new XYEdges(Color.BLACK, Color.BLACK, Color.BLACK,
                                Color.BLACK), new XYEdges(Color.BLACK, Color.BLACK,
                                Color.BLACK, Color.BLACK)));
            }
        }
    
        protected void onUnfocus() {
            if (!highlighted) {
                setBackground(BackgroundFactory.createLinearGradientBackground(
                        0x163d7c, 0x163d7c, 0x03162d, 0x03162d));
                setBorder(BorderFactory.createBevelBorder(new XYEdges(1, 1, 1, 1),
                        new XYEdges(Color.BLACK, Color.BLACK, Color.BLACK,
                                Color.BLACK), new XYEdges(Color.BLACK, Color.BLACK,
                                Color.BLACK, Color.BLACK)));
            }
        }
    
        public void showHighlighted(boolean focus) {
            if (focus) {
                highlighted = true;
                setBackground(BackgroundFactory.createLinearGradientBackground(
                        0x4bb7df, 0x4bb7df, 0x1b96da, 0x1b96da));
                setBorder(BorderFactory.createBevelBorder(new XYEdges(1, 1, 1, 1),
                        new XYEdges(Color.BLACK, Color.BLACK, Color.BLACK,
                                Color.BLACK), new XYEdges(Color.BLACK, Color.BLACK,
                                Color.BLACK, Color.BLACK)));
            } else {
                highlighted = false;
                setBackground(BackgroundFactory.createLinearGradientBackground(
                        0x163d7c, 0x163d7c, 0x03162d, 0x03162d));
                setBorder(BorderFactory.createBevelBorder(new XYEdges(1, 1, 1, 1),
                        new XYEdges(Color.BLACK, Color.BLACK, Color.BLACK,
                                Color.BLACK), new XYEdges(Color.BLACK, Color.BLACK,
                                Color.BLACK, Color.BLACK)));
            }
            invalidate();
        }
    
        public boolean isHighlighted() {
            return highlighted;
        }
    
    }
    

    behrk2 wrote:

    Now, I'm not sure why customButton.setText (calling) would trigger the fieldChanged().  Can anyone think of a reason why he can do?

    Thank you!

    Can you think of a reason why we can't do that? The field has changed, after all! Of course, the context (second argument to fieldChanged) will be PROGRAMMATIC in this case, that might be a pretty good indication for you. But not invoke fieldChanged at all would be wrong.

    This is why I don't like the idea of extending LabelField and not just the field for your custom badges - you have much less control over his behavior. If you want an example showing how to create abstract off-screen buttons, take a look at BaseButtonField and his descendants in managers, fields and advanced buttons.

  • Switch Cisco 2960/3560 = &gt; recovery password and default settings with the button Mode

    Hi Experts,

    I have some confusion with the button Mode with cisco 2960/3560 switches.

    I read on many forums and articles, but where things are not clear.

    a place given 3 seconds and somewhere is given 7 or 10 seconds.

    Qus1), what is the exact time to press/hold Mode button to perform two following tasks:

    A. password recovery (according to my knowledge 3 sec) good or bad?

    Configuration of the switch (start + run) would be safe

    After the recovery of password? Yes or no

    B. factory default (according to my knowledge 10 dry) good or bad?

    I'm afraid, because if I press mode button more than 3 seconds, then

    It will delete any configuration of cisco switch. Yes or no

    Qus2) I want to recover the catalyst 2960/3560 switch password without

    Start/run configuration to lose. That is my main concern.

    Please tell me how to do this, what will be the time keeping Mode buttom

    in a few seconds?

    Qus3) which means this line

    "If the password recovery mechanism is disabled in switch

    then you will lose all the config.

    This sentence has been given on this forum url

    https://supportforums.Cisco.com/thread/140848

    KS

    Attach a terminal or PC with terminal emulation (for example, Hyper Terminal) port console switch.

    Use the following terminal settings:

    • Bits per second (baud): 9600

    • Data bits: 8

    • Parity: None

    • Stop bits: 1

    • Flow control: Xon/Xoff

    Note: For more information on the wiring and connection of a terminal to the console port, refer to connecting a Terminal to the Console Port of Catalyst switches.

    Unplug the power cable.

    The power switch and take it to the switch: command prompt:

    2900XL, 3500XL, 2940, 2950, 2960, 2970, 3550, 3560, and 3750 switches of the series, to do this:

    Press and hold the mode button located on the left side of the façade, while you reconnect the power cable from the switch.

    2960, 2970 Release the Mode button when the SYSTEM LED flashes orange and then turns green. When you release the Mode button, the SYSTEM LED flashes green.
    3560, 3750 Release the Mode button after about 15 seconds when the SYSTEM LED turns green. When you release the Mode button, the SYSTEM LED flashes green.

    The system was interrupted before the flash at the end file system initialization

    loading the operating system software:

    flash_init

    load_helper

    boot

    switch:

    Run the flash_init command.

    switch: flash_init Initializing Flash... flashfs[0]: 143 files, 4 directories flashfs[0]: 0 orphaned files, 0 orphaned directories flashfs[0]: Total bytes: 3612672 flashfs[0]: Bytes used: 2729472 flashfs[0]: Bytes available: 883200 flashfs[0]: flashfs fsck took 86 seconds ....done Initializing Flash. Boot Sector Filesystem (bs:) installed, fsid: 3 Parameter Block Filesystem (pb:) installed, fsid: 4 switch: !--- This output is from a 2900XL switch. Output from !--- other switches will vary slightly.

    Run the load_helper command.

    switch: load_helper switch:

    Question the dir flash: command.

    Note: Be sure to type a colon ":" after the dir flash.

    Appears in the file system of the switch:

    switch: dir flash: Directory of flash:/ 2    -rwx  1803357                  c3500xl-c3h2s-mz.120-5.WC7.bin !--- This is the current version of software. 4    -rwx  1131                     config.text !--- This is the configuration file. 5    -rwx  109                      info 6    -rwx  389                      env_vars 7    drwx  640                      html 18   -rwx  109                      info.ver 403968 bytes available (3208704 bytes used) switch: !--- This output is from a 3500XL switch. Output from !--- other switches will vary slightly.

    Type rename flash: flash: config.old config.text to rename the configuration file.

    switch: rename flash:config.text flash:config.old switch: !--- The config.text file contains the password !--- definition.

    Issue the boot command to boot the system.

    switch: boot Loading "flash:c3500xl-c3h2s-mz.120-5.WC7.bin"...############################### ################################################################################ ###################################################################### File "flash:c3500xl-c3h2s-mz.120-5.WC7.bin" uncompressed and installed, entry po int: 0x3000 executing... !--- Output suppressed. !--- This output is from a 3500XL switch. Output from other switches !--- will vary slightly.

    Enter "n" at the prompt to abort the initial configuration dialog box.

    --- System Configuration Dialog --- At any point you may enter a question mark '?' for help. Use ctrl-c to abort configuration dialog at any prompt. Default settings are in square brackets '[]'. Continue with configuration dialog? [yes/no]: n !--- Type "n" for no. Press RETURN to get started. !--- Press Return or Enter. Switch> !--- The Switch> prompt is displayed.

    At the switch prompt, type en to enter a mode.

    Switch>en Switch#

    Password recovery

    Type rename flash: config.old flash: config.text to rename the configuration file with its original name.

    Switch#rename flash:config.old flash:config.text Destination filename [config.text] !--- Press Return or Enter. Switch#

    Copy the configuration file in the memory.

    Switch#copy flash:config.text system:running-config Destination filename [running-config]? !--- Press Return or Enter. 1131 bytes copied in 0.760 secs Sw1#

    The configuration file is now reloaded.

    Replace the current passwords that you do not know. Choose a password with at least one capital letter, one number and one special character.

    Note: Replace passwords that are required. You must crush not all passwords listed.

    Sw1# conf t !--- To overwrite existing secret password Sw1(config)#enable secret !--- To overwrite existing enable password Sw1(config)#enable password !--- To overwrite existing vty password Sw1(config)#line vty 0 15 Sw1(config-line)#password Sw1(config-line)#login !--- To overwrite existing console password Sw1(config-line)#line con 0 Sw1(config-line)#password 

    Write the running configuration in the configuration file with the write memory command.

    Sw1#write memory Building configuration... [OK] Sw1#

    For factory reset:

    do not give under the control of factory reset

    Switch#copy flash:config.text system:running-config

    can I copy the running configuration to Flash

    Switch flash running-config #copy:

    Destination file name [running-config]?

    Building configuration...

    [OK]

    Switch #copy running-config startup-config

    Name of destination file [startup-config]?

    Building configuration...

    [OK]

    Review the link for more information below

    http://www.Cisco.com/en/us/products/hw/switches/ps628/products_password_recovery09186a0080094184.shtml

    Please note the useful messages.

    Concerning
    Vesta
    "Everybody is genius." But if you judge a fish by its ability to climb on a tree, he will live his entire life, believing that this is stupid. "

  • JDialog with options and custom buttons

    I can't seem to find a builder for custom buttons and drop-down menu items. I wanted to do was add custom buttons this text simply nothing complicated. 'Connect' and 'Cancel '.
    /**
     * Dialog window for new connection.
     */
    protected String NewConnectionDialog()
    {
         Window win = SwingUtilities.getWindowAncestor(mainPanel);
         String[] databases = {"Oracle", "Access", "MySQL", "PostgreSQL"};
         Object[] options = {"Connect", "Cancel"};
    
         String s = (String)JOptionPane.showInputDialog( win, 
                   "Select Database:", "New Connection Wizard.", 
                   JOptionPane.OK_CANCEL_OPTION, icon, databases, 
                   "MySQL" );
    
         String nullStr  = ""; // no exceptions thanks
         return (s != null ? s.toUpperCase() : nullStr);
    }

    javax.swing.JOptionPane.showOptionDialog ()...

    JPanel pea = new JPanel();
    JLabel jl = new JLabel("Select DB");
    JComboBox jcb = new JComboBox(...stuff here..);
    pea.ad(jl);
    pea.add(jcb);
    
    JButton conButton = new JButton("Connect");
    Object[] buttonRowObjects = new Object[] {
      conButton, "Cancel"
    };
    
    int result = JOptionPane.showOptionDialog(
      Component parentComponent,
      Object message,//<- pea right here
      String title,
      int optionType,
      int messageType,
      Icon icon,
      Object[] options,//<- buttonRowObjects here
      Object initialValue
    );
    

    There now, your patience has paid off. And don't forget to eat your vegetables.

  • Lack the "Switch between Windows" button in my Quick Launch toolbar

    From: Daz 150969

    I don't have the button tab in the taskbar in order to operate the Aero of the computer part. My card under windows is 5.9. I can run aero if one press tab, ctrl and windows key and it work very well, but I think that there should be a button on the tab in the taskbar?

    From: Andrew McLaren

    The "Switch between Windows" button in the toolbar quick launch is enabled by a file called "Window Switcher.lnk" in your Quick Launch folder. If this file is missing, the icon does not appear in the Quick Launch toolbar.

    You are probably missing this file and need to replace it.

    You can get a copy of the original file here:

    "C:\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\Window Switcher.lnk"

    This place is normally hidden in Explorer (you won't see it).

    To put it on your own toolbar quick launch, go to a command prompt and enter these commands (replace "" with your real username, of course!  :-) -

    C:\>CD C:\Users\\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch

    C:\Users\launch \AppData\Roaming\Microsoft\Internet Explorer\Quick > copy "C:\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\Window Switcher.lnk.

    You should see a "1 file (s) copied" message when the file is copied successfully. Then type "exit" to exit the command prompt.

    The "Switch between Windows" icon now needs re - appear in your quick launch menu.

    It will be useful,

    --

    Andrew McLaren
    amclar (at) optusnet dot com dot to the

    Another response of the community of Windows Vista discussion groups

  • lost the "switch between windows" button on the Quick Launch toolbar

    Hi, I lost the "switch between windows" button of the toolbar quick launch, how can I restore it?

    • You have problems with programs
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    Dasepo salvation,

    Here are the instructions for the program shortcut "switch between windows" returned the fell on the Quick Launch toolbar:

    First of all, make sure you that you must show hidden files and folders active. Here's how:

    Go to: Start/Control Panel folder Options/configuration and select the 'view' tab select "Show hidden folders and files under the section files and folders hidden from advanced settings".

    Then you can get the file from quicklaunch default section. This location of file is here:

    C:\Users\Default\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch

    You can paste this link into the search bar (Ctrl-Esc). When you get to this place, you will find the 'switch between client.lnk' which you can then drag directly to the Windows Orb and it going bust in the Quick Launch bar.

    Hope this helps,

    Steve <> Microsoft Partner

  • Need help with custom dialog box

    I created a custom help dialog box. The problem is that 5 buttons do not properly fit in my manager of horizontal field on some blackberry devices. How can I make own? I tried to use my own custom buttons that allow me to specify their width and height, but I'm unable to get the width of the dialog box, so I can't determine how wide should be buttons.

    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.container.HorizontalFieldManager;
    
    public class HelpDialog extends Dialog
    {
        static int ButtonPressed;
        HorizontalFieldManager hfmChoices = new HorizontalFieldManager();
        ButtonField cmdFirst = new ButtonField("|<")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 0;
                close();
                return true;
            }
        };
        ButtonField cmdPrev = new ButtonField("<")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 1;
                close();
                return true;
            }
        };
        ButtonField cmdNext = new ButtonField(">")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 2;
                close();
                return true;
            }
        };
        ButtonField cmdLast = new ButtonField(">|")
        {
            protected boolean navigationClick(int status, int time)
            {
                ButtonPressed = 3;
                close();
                return true;
            }
        };
        ButtonField cmdClose = new ButtonField("Close")
        {
            protected boolean navigationClick(int status, int time)
            {
                close();
                return true;
            }
        };
    
        public HelpDialog(String message, int page, int maxPages)
        {
            super("Help (Page: " + page + " of " + maxPages + ")\n\n" + message + "\n", null, null, -1, null, 0);
            ButtonPressed = -1;
            if (page <= 1)
            {
                cmdFirst.setEnabled(false);
                cmdPrev.setEnabled(false);
            }
            if (page >= maxPages)
            {
                cmdNext.setEnabled(false);
                cmdLast.setEnabled(false);
            }
            hfmChoices.add(cmdFirst);
            hfmChoices.add(cmdPrev);
            hfmChoices.add(cmdNext);
            hfmChoices.add(cmdLast);
            hfmChoices.add(cmdClose);
            add(hfmChoices);
        }
    }
    

    Thank you

    Most people have no need a close button, they expect the ESC to do it for them.

    That said, I disagree with this statement:

    "I think that the only good way to use managers other than the AbsoluteFieldManager, is to use them at all."

    Designing a user experience that works well on multiple devices is difficult, and I don't think that has a size fits all approach work.  In addition, I don't have the time to create formats for specific screens for each device type, and although this will not happen now, I didn't have to rework screen designs every time that a new device came out.  I think that it is possible to create a common user interface experience given the size of the screen, and whether it is touch.  If you want to read my thoughts on this, have a look at the tutorial of the user interface you will find here:

    http://supportforums.BlackBerry.com/T5/Java-development/tutorials-for-new-developers-part-1/m-p/1621...

  • How to add and delete custom buttons

    Hello world

    I have two field of custom button with different colors of red and white button.

    And I want to add and remove both button in the same place each other.

    I mean when I click on the red button, red button remove the screen and the same when I click on the white button to remove white button must be appear and red button should appear. Both button must be exposed to the same place.

    Please any idea...

    Thank you.

    public void add (field)
    survey
    IllegalStateException - if the field has already been added to a Manager.

    Public Sub delete (field)
    IllegalArgumentException - if the field to delete does belong to this Manager.

    So check with the field.getManager () function to make it work properly...

  • Custom button field has two tops?

    I am trying to create a field of custom button so that I can have two lines of text - but I'm getting a second top so say (a second box with the shading/etc that has the top of a field of button).

    Here's a screenshot of it

    The bottom button is just a normal button.

    Field of custom button code:

    package com.smartmech.bb;
    
    import net.rim.device.api.system.Display;
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.Graphics;
    import net.rim.device.api.ui.Ui;
    import net.rim.device.api.ui.component.ButtonField;
    
    public class _customButtonField extends ButtonField {
            private int setWidth;
            private int setHeight;
            private boolean disabled = false;
            private String lblTxt1;
            private String lblTxt2 = "";
    
            _customButtonField( String text, int Width, int Height, long setStyle) {
                super(text, setStyle);
                setWidth = Width;
                setHeight = Height;
                lblTxt1 = text;
            } //customButtonField
    
            _customButtonField( String text, String text2, int Width, int Height, long setStyle) {
                super("",setStyle);
                setWidth = Width;
                setHeight = Height;
                lblTxt1 = text;
                lblTxt2 = text2;
            } //customButtonField
    
            public int getPreferredWidth() {
                return setWidth;
            } //getPreferredWidth
    
            public int getPreferredHeight() {
                return setHeight;
            } //getPreferredWidth
    
            public boolean isFocusable() {
                if(disabled)
                    return false;
                return true;
            } //isFocusable
    
            public void disable() {
                disabled=true;
                super.setVisualState(ButtonField.VISUAL_STATE_DISABLED);
            } //disable
    
            public void enable() {
                disabled=false;
                super.setVisualState(ButtonField.VISUAL_STATE_NORMAL);
            } //enable
    
            protected void layout(int width, int height) {  
    
                String platform = net.rim.device.api.system.DeviceInfo.getPlatformVersion();
    
                if (platform.substring(0,1).equals("5")) {
                    setExtent(setWidth, setHeight); //works in v5
                }
                else if (platform.substring(0,1).equals("6")) {
                    super.layout(setWidth, setHeight);
                    //setExtent(setWidth, setHeight);
                }
    
            } //layout
    
            protected void paint(Graphics g){
    
                super.paint(g);
    
                if (lblTxt2 != "") {
    
                    int myY = getPreferredHeight() / 2;
                    int myX = 0;
    
                    int myFH = g.getFont().getHeight();
                    if (myFH * 2 > getPreferredHeight()) {
                        myY = getPreferredHeight() - myFH;
                    }
                    myX = (getPreferredWidth() - g.getFont().getBounds(lblTxt1)) / 2;
                    g.drawText(lblTxt1, myX,0,0,this.getWidth());
    
                    myX = (getPreferredWidth() - g.getFont().getBounds(lblTxt2)) / 2;
                    g.drawText(lblTxt2, myX,myY,0,this.getWidth());
    
                } //lblTxt2 not blank
    
            } //paint
    
    } //customButtonField
    

    And call it:

    _customButtonField summaryBtn = new _customButtonField("Location", "Summary", btnWidth, btnHeight, ButtonField.CONSUME_CLICK);
     summaryBtn.setFont(mainFont);
    

    Any ideas as to why this is happening?

    Greetings.

    I agree with simon. And that's because you're going to have to completely override the paint method to reach your goal.

    Try stretching the field and drawing and layout of all within your class.

  • Custom button on a touch paint problem

    I have a custom button that I use to the pop-up window of a PopupScreen. The custom button has his own painting methods (he also replaces the applyTheme() method), and for the most part, everything works as expected.

    The only problem I have is when the button is pressed. If I press and hold the button, the button is redrawn with what seems to be the default paint scheme (it seems that it is painted without label as well). As soon as I release the button and the context menu is displayed, the button is redrawn with my custom methods and look as I hope.

    Suggestions appreciated, thanks!

    If navigationClick is treated by default? This is the root of the problem: I think that integrated ButtonField.navigationClick defines the Visual status of the "active" field Replace to do what you want it to do and do not call super.navigationClick (well, call of may when the status parameter is not 0 - in the case of Alt-click and make shift-click - and you don't want to deal with yourself).

  • Development/unfocus field custom button problem

    Hi all

    I have something weird happens.  I have a custom button field that swaps the images based on a focused state or blur.  I have been using this field custom for awhile now, and I have never had any problems.  Imagine the following provision:

    ______________    ________________________

    | Custom button |    | BasicEditField |

    ------------------------    ------------------------------------------

    When my screen is launched, the focus is on the custom button.  If I move the trackball in a downward movement, the focus is taken the custom button, and its background image changes adequately to what has been defined in the untargeted State.  The BasicEditField then has the focus.  This is the correct behavior.

    If, however, I move the trackball in a movement to the right to the BasicEditField, then the BasicEditField will indeed get the focus, however the custom button field always displays its "highlight" picture  Using print statements, I was able to determine that when I move in a movement to the right with the trackball, the custom field button loses the focus and then gets the focus back to back, that's why it shows the highlighted image.

    Additional info:  This isn't an issue on touch devices, and custom button Manager is a TableLayoutManager.

    Any ideas why this might be happening?  Here's the code to my custom button field:

    public class BitmapButtonField extends Field {
        private String text = "";
        private Bitmap bitmap;
        private Bitmap bitmapHighlight;
        private Bitmap b;
        private boolean highlighted;
    
        public BitmapButtonField(String image, String imageHighlight, long style) {
    
            super(style | Field.FOCUSABLE);
    
            this.bitmap = Bitmap.getBitmapResource(image);
            this.bitmapHighlight = Bitmap.getBitmapResource(imageHighlight);
    
            b = bitmap;
    
        }
    
        public BitmapButtonField(String text, String image, String imageHighlight,
                long style) {
    
            super(style | Field.FOCUSABLE);
    
            this.text = text;
            this.bitmap = Bitmap.getBitmapResource(image);
            this.bitmapHighlight = Bitmap.getBitmapResource(imageHighlight);
    
            b = bitmap;
    
        }
    
        protected void drawFocus(Graphics graphics, boolean on) {
            // Do nothing
        }
    
        public int getPreferredHeight() {
            return bitmap.getHeight();
        }
    
        public int getPreferredWidth() {
            return bitmap.getWidth();
        }
    
        protected void layout(int width, int height) {
            setExtent(getPreferredWidth(), getPreferredHeight());
        }
    
        protected boolean navigationClick(int status, int time) {
            fieldChangeNotify(1);
            return true;
        }
    
        protected void onFocus(int direction) {
            b = bitmapHighlight;
            invalidate();
            System.out.println("FOCUSED");
    
        }
    
        protected void onUnfocus() {
            b = bitmap;
            invalidate();
            System.out.println("UNFOCUSED");
        }
    
        protected void paint(Graphics graphics) {
    
            int topTextPadding = (b.getHeight() - getFont().getHeight()) / 2;
            int sideTextPadding = (b.getWidth() - getFont().getAdvance(text)) / 2;
    
            graphics.drawBitmap(0, 0, getWidth(), getHeight(), b, 0, 0);
            graphics.setColor(Color.WHITE);
            if (text.length() > 0) {
                graphics.drawText(text, sideTextPadding, topTextPadding,
                        Graphics.ELLIPSIS, b.getWidth());
            }
        }
    }
    

    Have you looked at navigationMovement in the TableLayoutManager?  I confess that I rewrote it because it handles no left and right as I wanted.  Perhaps, you might be able to do the same thing.

Maybe you are looking for