Setting up a toggle button where the caption changes when clicked

Good day all;
I am designing a new form and I am trying to figure out how to use 1 button to either display a field or hide a field.
What I am looking for exactly is the following.
A button that will default with the caption “Hide Field X” when the form is opened (and Field X is visible). When the user clicks on this button, “Field X” is hidden and the caption on the button changes to “Display Field X”. When the user clicks on this button “Field X” is displayed and the caption on the button changes to “Hide Field X”. I guess what I am looking for is a toggle switch with a caption change depending on “Field X” Presence.
Thanks for any suggestions
Chomp

Hi Chomp,
If you have a look at the Edit button Table 5 it will show how to change the caption of the button: http://assure.ly/gk8Q7a.
Niall

Similar Messages

  • Multiple toggle buttons to the same destination causes conflicts

    I'm trying to set up multiple toggle buttons so that a user can click on a button at any time and set the state of the dashboard. Each toggle button has a unique value (and each one has the same static value for both on and off) and I've mapped all the toggle buttons to the same destination cell. But they all seem to be competing to set the desination to their preferred value even when they're not being clicked on and, as a result, the dashboard keeps changing state in unexpected ways. Is there a fix for this?

    When you have multiple components trying to insert to the same destination cell, the front-most object wins at load time. So, if tb1, tb2, tb3 (tb3 being the front-most object) are all set to respectively insert values 1, 2, 3 to the same cell, the cell will have value 3 initially.
    Now there is an issue when objects in different groups try to insert to the same cell. The release note for FP3 implies that this problem is resolved, but I think it is not fixed completely...

  • How to create a custom control of a button where the look will be applied to all others but not the Boolean text?

    Hi all
    I would like to create a customized button as a master so that if I change the look of the master all other buttons will change too.
    I have done this with a custom control as a "strict type def" otherwise the look will not change BUT If I do this as a strict type def I cannot change the Boolean text anymore which should be different on every button.
    How can I create a master control of a button where the look will be applied to all others but not the Boolean text?
    Stay Hungry, Stay Foolish
    Solved!
    Go to Solution.

    Steve Chandler wrote:
    I don't think you can do that. I just looked and as I suspected the Boolean text property is read only for strict typedefs so you cannot use property nodes to change the text.
    As a workaround just make it a typedef. When you want to change the look open the typedef and make it strict, make your changes, then make it non strict again. You will have to update the Boolean text again for all instances. Kind of a pain. Maybe this is something for the idea exchange.
    Kudos for being sneaky.
    I like these creative work-arounds!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • I set iCloud up last week and the next day when out in the field I could not get Outlook to open up.  I want to change my settings so I can get mail at home or in the field

    I set iCloud up last week and the next day when out in the field I could not get Outlook to open up.  I want to change my settings so I can get mail at home or in the field, not just when i'm at home.  I have a PC and fios internet with Verizon at home.  I have a Sprint air card in the field or access an available wifi.  I want to change my settings to allow for receiving email in the field.  What's the point of an air card and icloud for backup fi it doesn't work in the field for some odd reason?

    Apple - Support - Mail Setup Assistant

  • I have an iPhone 4 and want to be able to send photos via ams. I hold down the copy button on the picture but when I go to paste it in the text of a message it won't paste. Any ideas on this please.Thanks

    I have an iPhone 4 and want to be able to send photos via sms. I hold down the copy button on the picture but when I go to paste it in the text of a message it won't paste. Any ideas on this please??Thanks

    No phone can send photos via SMS. You would need MMS (or iMessage or a 3rd party app such as WhatsApp). SMS messages are limited to 160 characters of text only.

  • Where the session begin when user login

    Hi all,
    Just want a detail understanding of where the session starts when user login in ATG application (handle login), and where the session ends (handlelogout)
    thanks and regards
    333

    Session management is completely application server related.
    ATG do not play any role in session management.
    Refer this doc to under how session is created and managed.
    http://docs.oracle.com/cd/E19644-01/817-5451/dwsessn.html
    Peace
    Shaik

  • Im having trouble with error 13019 I have read the previous discussions about this matter and have tried to do them except for the fact that under the music tab when clicking on my ipod every thing is frozen. It s not my comp. and i dont wish to restore.

    Im having trouble with error 13019 I have read the previous discussions about this matter and have tried to do them except for the fact that under the music tab when clicking on my ipod every thing is frozen. It s not my comp. and i dont wish to restore. Please help!

    If you are wondering why you are not getting any responses, it is because you have vented a complaint without any details that make any sense or give anyone something to work on.
    If you want help, I suggest actually detailing what has happened, with versions of software etc. Anything that would let us assist.
    As a start I am guessing that you have not really got the hang of "How it all works". Firstly download the Pages09_UserGuide.pdf from under the Help menu. Read that and view the Video Tutorials in the same place. A good addition would be the iWork 09 Missing manual book and something to help you learn how to use your Mac.
    If there are specific tasks you need help with:
    http://www.freeforum101.com/iworktipsntrick/index.php?mforum=iworktipsntrick
    Is a good resource.
    Peter

  • TS3276 Mail shows in the doc, but when clicked or doubled clicked does not open on the desktop, HELP !

    Mail shows in the doc, but when clicked or doubled clicked does not open on the desktop, HELP !

    Try restarting your Mac.
    Open Termimal (Applications/Utilities/Terminal)Try entering this command: killall Dock, and then hit enter
    Try dragging the Mail icon out of the dock, then let it disappear in a puff of smoke. Then from Applications/Mail try dragging the Mail icon back into the dock, and see if it works.
    Does Mail open otherwise? Like if you try opening it from your Applications folder?if it doesn't:
    Boot into your recovery partition (restart, hold down ⌘R until you see the Apple logo), and use Disk Utility to repair your hard drive. Repair permissions too while you're there. OS X: About OS X Recovery
    if that doesn't work: reinstall Mavericks over your current installation.
    Message was edited by: arthur

  • Why do the colors change when I reopen a document?

    Why do the colors change when I reopen a document?

    Are you opening the same Pages document or do you open another document like Word? I has recently been a similar discussion in this forum.

  • Use to have a + on the right of the tab that when clicked, opens a new tab. what happened to this?

    use to have a + on the right of the tab that when clicked, opens a new tab. what happened to this?

    greghcrash wrote:
    It Would be great to have keys on the onscreen keyboard.
    Such as a computer keyboard.
    With BACKSPACE, TAB WITH SETTINGS, DELETE, TYPE OF TYPE, BOLD TYPE, UNDERLINE ETC....
    I HAVE A KEYBOARD COVER AND IF I NEED TO USE CERTAIN KEYS I HAVE TO SWITCH TO MY KEYBOARD CASE AND THAT IS VERY INCONVENIENT.
    IT IS ALSO A TIME WASTER.
    When you installed iOS 8 did you read about the new features? Applications can create custom keyboards…
    http://www.imore.com/custom-keyboards-ios-8-explained
    You need to look for an app that has a custom keyboard with the features you require, I suggest you find one without CAPSLOCK
    greghcrash wrote:
    IT IS ALSO AGGRAVATING WHEN TYPING AND IT AUTOMATICALLY CHANGES THE WORDS THAT YOU WANT TO USE.
    THANK YOU FOR YOUR TIME
    Again you need to look at how to manage the device - these settings can be turned off already & you can edit the 'suggestions' too.
    Settings > General > Keyboards > turn Auto-Correction Off.
    Sadly you cannot disable autocorrect temporarily, so it's all or nothing.

  • Set Icon for toggle button

    I created Icon with Borderpane, image and text which I want to set as button icon.
    @Override
        public void start(Stage primaryStage)
            final VBox vbox = new VBox();
            // create 3 toggle buttons and a toogle group for them
            ToggleButton tb1 = new ToggleButton();
            tb1.setGraphic(newConnectionIcon());
            ToggleButton tb2 = new ToggleButton();
            ToggleButton tb3 = new ToggleButton();
            final ToggleGroup group = new ToggleGroup();
            tb1.setToggleGroup(group);
            tb2.setToggleGroup(group);
            tb3.setToggleGroup(group);
            // select the first button to start with
            group.selectToggle(tb1);
            final Rectangle rect1 = new Rectangle(300, 300);
            rect1.setFill(Color.DARKOLIVEGREEN);
            final Rectangle rect2 = new Rectangle(300, 300);
            rect2.setFill(Color.LAVENDER);
            final Rectangle rect3 = new Rectangle(300, 300);
            rect3.setFill(Color.LIGHTSLATEGREY);
            tb1.setUserData(rect1);
            tb2.setUserData(rect2);
            tb3.setUserData(rect3);
            group.selectedToggleProperty().addListener(new ChangeListener<Toggle>()
                @Override
                public void changed(ObservableValue<? extends Toggle> ov, Toggle toggle, Toggle new_toggle)
                    if (new_toggle == null)
                    else
                        vbox.getChildren().set(1, (Node) group.getSelectedToggle().getUserData());
            HBox hBox = new HBox();
            hBox.getChildren().addAll(tb1, tb2, tb3);
            hBox.setPadding(new Insets(10, 10, 10, 10));
            vbox.getChildren().addAll(hBox, (Node) group.getSelectedToggle().getUserData());
            StackPane root = new StackPane();
            root.getChildren().add(vbox);
            Scene scene = new Scene(root, 800, 850);
            primaryStage.setScene(scene);
            primaryStage.show();
        private static BorderPane newConnectionIcon() {
            // Add background effect
            DropShadow ds = new DropShadow();
            ds.setOffsetY(2.0);
            ds.setOffsetX(2.0);
            ds.setColor(Color.GRAY);
            // New BorderPane which will hold the components
            bpi = new BorderPane();
            bpi.setEffect(ds);  // Add the effect
            bpi.setCache(true);
            // Set the size of the BorderPane
            bpi.setPrefSize(30, 30);
            bpi.setMaxSize(30, 30);
            // Add style       
            bpi.setStyle("-fx-background-color: linear-gradient(#f2f2f2, #d4d4d4);"
                    + "  -fx-background-insets: 0 0 -1 0, 0, 1, 2;"
                    + "  -fx-background-radius: 3px, 3px, 2px, 1px;");
            // Add Label to the Icon
            Text inftx = new Text("New Connection");
            inftx.setFont(Font.font ("Verdana", 5));   // Set font and font size
            inftx.setFill(Color.WHITE); // Set font color
            ncpic.setFitHeight(25);    // Set size of the Icon picture
            ncpic.setFitWidth(25);
            // Internal StackPane which will hold the picture and the Icon Label
            StackPane stack = new StackPane();
            stack.getChildren().addAll(ncpic, inftx);   // Add the picture and the Label
            // Add the StackPane to the main BorderPane       
            bpi.setCenter(stack);
            // Change the border of the Icon when the mouse is over the Icon
            bpi = mouseOver(bpi);
            // Navigate to new Panel when the user clicks on the Icon
            bpi.setOnMouseClicked(new EventHandler<MouseEvent>() {
                @Override
                public void handle(MouseEvent t) {
            return bpi;
    How I can remove the default togglebutton and use the my custom icon as a button?

    Yes, they are icons and they are called "handles". The easiest way to change then is to use UIManager.
    If you haven't done so before, look through the hash table UIManager.getLookAndFeelDefaults().
    import java.awt.*;
    import java.net.*;
    import javax.swing.*;
    public class TreeIcons {
         public static void main(String[] args) throws MalformedURLException {
              String prefix = "http://forum.java.sun.com/images/";
              UIManager.put("Tree.openIcon", new ImageIcon(new URL(prefix + "dont_save.gif")));
              UIManager.put("Tree.closedIcon", new ImageIcon(new URL(prefix + "save.gif")));
              UIManager.put("Tree.leafIcon", new ImageIcon(new URL(prefix + "forum_new.gif")));
              UIManager.put("Tree.expandedIcon", new ImageIcon(new URL(prefix + "email_faded.gif")));
              UIManager.put("Tree.collapsedIcon", new ImageIcon(new URL(prefix + "email.gif")));
              JFrame f = new JFrame("TreeIcons");
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              f.getContentPane().add(new JTree());
              f.setSize(new Dimension(300,400));
              f.setLocationRelativeTo(null);
              f.setVisible(true);
    }

  • Programmatically setting value of toggle button?

    Is this not possible? I've looked at the help for both SetCtrlVal() and SetCtrlAttribute(), and it doesn't look like it can be done. True?
    My app has a control button to clear the displayed graph. It would be nice if the function's first action were to set the value of a toggle button to "OFF." Any other way of accomplishing this?
    Thanks.
    Solved!
    Go to Solution.

    Well, then I must be forming the call incorrectly. I couldn't find an example using ATTR_CTRL_VAL, so I wrote this:
    rc = SetCtrlVal (g_hmainPanel, PANEL_MAIN_TOGGLEBUTTON, ATTR_CTRL_VAL, 0);
     And I get the run-time error:
    NON-FATAL RUN-TIME ERROR: "cleargraph.c", line 30, col 84, thread id 0x00002EE8: Too many arguments to variable argument function.
     So, if the ATTR_CTRL_VAL form of the call doesn't accept any more arguments, how do I inform the command of the state I wish to put the control into?
    Thanks.

  • How do I set up a new button on the button bar?

    I was used to previous versions of A/Works in which you just needed to create a macro. In the latest version, it's not so simple. Could someone let me know, preferably in words of one syllable (lol), the steps to take to set up a button. I want a double underline one, it's so frustrating not having one as I use it all the time.
    Any help gratefully received!
    Thankyou
    Marianne
    Mac Pro   Mac OS X (10.4.9)  

    In the Finder, choose New Finder Window from the File menu, and then locate and click on the item in the sidebar named Applications. Next, open the AppleScript item inside, find the Script Editor application, and double-click it. Copy and paste the following text into it up to the second blank line following:
    tell application "AppleWorks 6"
    set style of selection of document 1 to {class:text style info, on styles:{double underline}}
    end tell
    Press the Command and S keys, choose Application as the File Format, and click Save. Open AppleWorks and click on the AppleWorks menu, followed by scrolling down to Preferences and clicking on Button Bar. Find and push the New button, choose Launch Application from the Action drop-down menu, click Choose, locate the script, and click OK.
    (20382)

  • How can I set some space between buttons on the buttonbar

    I want to set some empty spaces between buttons on the button control bar?
    Thank you.
    Scott

    If you mean a JToolBar try addSeparator();
    If you mean a JMenuBar... I don't know!

  • Firefox on the Mac used to have a toolbar toggle button on the Titlebar. Can I get it back?

    What happened to the Tool Bar toggle button that used to be on the far upper right of the Title bar? FF4 on a Mac.

    You're welcome.

Maybe you are looking for