Multiple buttons in "on" state

What i want to achieve is two buttons in the "on" state
simultaneously.
A horisontal menu, featuring the main options, which when
clicked stays "on", and produces a second horizontal sub menu of
two or three links, which when clicked ALSO stay "On" eg.
Home About Contact
History News Gallery
Local history My history world history
The above would be an eample of what i am trying to achieve
with both History and Local history being "ON" when viewing the
Local history page.
I use <body onload="initiateButtons(12);"> to load the
javascript for the main menu, and i have tried every combination of
<body onload="initiateButtons(12), initiateButtons(5);"> to
try to load BOTH at the same time.
Any ideas?
Thanks

I found a solution to this: It's the getHeaderRect method in class JTableHeader.
table.getTableHeader().addMouseListener(new MouseAdapter(){
  public void mouseClicked(MouseEvent e) {
    Rectangle panelBounds = table.getTableHeader().getHeaderRect(column);
    Rectangle buttonBounds = sortAscendingButton.getBounds();
    buttonBounds.translate(panelBounds.x, panelBounds.y);
    if (buttonBounds.contains(e.getX(), e.getY()) && processedEvents.add(e)){  // The click was on this button.
      ((MyTableModel) table.getModel()).sortAscending(column);
});

Similar Messages

  • Hiding buttons in object states

    I am trying to do something that I feel is very simple but I'm losing my head working it out ;-) I have a simple page with multiple buttons that display a full page photo. It's all working fine, but no matter how I try and use layers, I simply cannot hide all my buttons. The attached images should explain what I am trying to do - there are buttons (the pins) which each trigger a full page photo using object states. Obviously I don't want those pins to show on my images. I feel like I am missing something very simple... thanks heaps for any assistance.

    Yeah, it's pretty simple:
    Build your layer 1 grouping pins and map together. Or make a single full page graphic showing map and pins. Put your buttons (transparent rectangles) above the graphic and attach a "go to state n" action to each.
    All photo layers should have a full page image with a "go to state 1" button above it.  Sometimes I use even a simpler method – I just convert the image itself  to a full page "go to state" button. I like the user experience: click anywhere on the page to go back to hotspots.
    Your document will have nothing outside the MSO, neither in background, nor above the MSO.
    The only tricky part is , that when you copy/paste buttons into object states, they loose their assigned actions. After completing the MSO you have to visit each button by selecting it in your layers panel to assign proper action.
    You can set the time of cross-fade between the states in the Folio Overlays panel.

  • How to use one pop up window for multiple buttons and input fields?

    Hi Experts,
    I have created a pop up window that will be opened from multiple buttons in the same view. There are input fields that the data will be populated from a pop up window.  How can I set up which button that a pop up window is opened from? I also would like to populate the data from a pop up window to the input field next to a clicked button. There are 6 buttons and 6 input fields that share the same pop up window. I would very appreciate your responses.
    Thank you,
    Don

    Hi,
    Try creating 2 context attributes, one in your component controller and the other in the pop-up view. Bind the attribute of pop-up view to the component controller attribute.
    In the main view, on click of every button set a unique code in the controller's context which helps you in identifying the button clicked. Since u have created a binding to the pop-up view attribute the value flows from the controller.
    In the init method of your pop-up view, check the value of the attribute and based on that display which ever UI elements are required.
    Eg:
    On Button 1 click set value "B1", Button 2  value "B2" etc. In the init() of pop-up view u can check the values and perform the required operation:
    if(("B1").wdContext().currentContextElement().getButtonIdentifier()){
    else...{
    Hope this helps you.
    Regards,
    Poojith MV

  • Multiple buttons on a single slide each connecting to a different url

    Using a trial version of Captivate 7.  I have a handful of slides where the customer wants to open different forms via url.  I tried using a button for each link, inserting the url and using the "enter" key for each of the multiple buttons.  Works fine with the mouse but for 508 folks who tab to the URL and hit the enter key ......... I get many instances where the incorrect url is activated.  Is there a way around this without assicning a different shortcut key for buttons where thare are more than one on a single slide?     Thanks

    Welcome to AD!
    Here is an article on using multiple ipods. I suggest method 1 and steer clear of method 3.
    http://support.apple.com/kb/HT1495
    For your point #1, sharing music on same PC between users, put it in a shared library & set permissions as directed here
    http://support.apple.com/kb/HT1203
    For #2, itunes doesn't have the capability to monitor folders for new content. You'll need to get something like the free program 'itunes folder watch'.

  • How to add multiple button/choices in  button choice

    HI all ,
            How to add multiple button/choices in  button choice ?

    Initialize a cluster array (CrsrList type) with as many cursors as you think you would ever need.   Setup your cursors dynamically, then delete the unused cursors (array elements) and then update your CursorList property.
    Message Edited by vt92 on 03-20-2009 04:04 PM
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
    Attachments:
    cursors.PNG ‏5 KB

  • How to create multiple buttons in ALV Toolbar in Webdynpro ABAP

    Hi all,
    I am trying to create multiple buttons in Webdynpro  ALV toolbar, please go through the code.
    What happening is, second button is replacing the first one.
    DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
       lo_cmp_usage =   wd_this->wd_cpuse_alv_table( ).
       IF lo_cmp_usage->has_active_component( ) IS INITIAL.
         lo_cmp_usage->create_component( ).
       ENDIF.
       DATA lo_interfacecontroller TYPE REF TO iwci_salv_wd_table .
       lo_interfacecontroller =   wd_this->wd_cpifc_alv_table( ).
        DATA lv_value TYPE REF TO cl_salv_wd_config_table.
       lv_value = lo_interfacecontroller->get_model(
       DATA lr_buttonui1 TYPE REF TO cl_salv_wd_fe_button.
       DATA lr_buttonui2 TYPE REF TO cl_salv_wd_fe_button.
       DATA button1 TYPE REF TO cl_salv_wd_function.
       DATA button2 TYPE REF TO cl_salv_wd_function.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).
    How can I overcome this??
    Thanks
    Eshwar

    Hi Eshwar,
    The button Ids are same for both the buttons in your code. You need to change it as BUTTON1, BUTTON2.
    **First button
       CREATE OBJECT lr_buttonui1.
       lr_buttonui1->set_text('Button')."setting the text of the button on alv toolbar
       button1 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON1')."creating the function for alv button
       button1->set_editor( lr_buttonui1 ).
    **Second button
       CREATE OBJECT lr_buttonui2.
         lr_buttonui2->set_text('Button1')."setting the text of the button on alv toolbar
       button2 = lv_value->if_salv_wd_function_settings~create_function( id = 'BUTTON2' )."creating the function for alv button
       button2->set_editor( lr_buttonui2 ).

  • PSD Rollover Button with image in front stops button from changing state

    I have a wide PSD button that changes state when rolled over. I would like to place a PNG image with transparency in some areas over the top of it so that the rollover button shows through the transparent areas of the PNG.
    How can you get it to do the rollover effect when the user mouses over the bit of the button that the image is in front of? Is ther a way of making the PNG 'invisible' to the mouse?
    I know I could redesign the button so that it includes the image but I'm trying to keep file sizes and load times to a minimum, I use this button a lot on my website with a different on each, and having that number of individual buttons would result in a bloated, slow-loading website.

    Hi Abhishek
    Thanks for your reply. I was able to achieve the effect I wanted by having the PNG and the PSD Button with the same link and then grouping them. This means I can mouse over the PNG and still get the PSD rollover effect, which is perfect.
    However I also have another similar problem. I have some different PSD Rollover Buttons which have some text in front of them (basically it's the button label). On some of these buttons when you roll over the text it prevents the rollover state of the button, and on other buttons the rollover effect occurs as it should, and there doesn't appear to be any consistency about which does what. Grouping or ungrouping doesn't appear to make a difference. Can you help?

  • How prevent simultaneous execution of multiple button threads?

    My AS 3 program has multiple buttons. Users can select one and then immediately select another and this causes 2 threads that collide.  Once one button is executing, I want the other buttons to ignore clicks.
    I've tried using a lock:Boolean to indicate a button is being processed.  Each button checks lock.  My logic is such that when the AS 3 processor detects a locked condition, it abandons execution of that button.  However, surprisingly, it abandons execution only termporarily ... once the the boolean is unlocked, AS 3 comes back and executes the button.
    The problems are twofold:  1)  the first time the 2nd button attempts to execute (by checking lock), when it returns (from checking lock) and attempts to pick up processing where it left off, it seems to forget where it was and does not utlimately complete its task(s); possibly variables have been altered, it is difficult to say.  That is, AS 3 is unable to successfully pickup where it left off on the first button.
    2) the second problem is that AS 3 incorrectly returns to button 2 after the lock condition is cleared.  It persists and will execute that button.
    Can anyone tell me how once one button is selected, the others can be locked out and won't execute??  Multiple threads from these buttons is a problem.
    Thanks in advance.
    Steve @ U Iowa

    dmennenoh - OK.  The downside to that type of solution is that each button has to "know" which other buttons are on the stage at that time, but, yes, that should work.  Do you think turning their visibility off would or would not be as effective as removing the event listeners?  I'm thinking turning visiblity on or off is simpler and simpler to manage.  Thanks for your help.

  • Multiple Buttons in JTable Headers:  Listening for Mouse Clicks

    I am writing a table which has table headers that contain multiple buttons. For the header cells, I am using a custom cell renderer which extends JPanel. A JLabel and JButtons are added to the JPanel.
    Unfortunately, the buttons do not do anything. (Clicking in the area of a button doesn't appear to have any effect; the button doesn't appear to be pressed.)
    Looking through the archives, I read a suggestion that the way to solve this problem is to listen for mouse clicks on the table header and then determine whether the mouse clicks fall in the area of the button. However, I cannot seem to get coordinates for the button that match the coordinates I see for mouse clicks.
    The coordinates for mouse clicks seem to be relative to the top left corner of the table header (which would match the specification for mouse listeners). I haven't figured out how to get corresponding coordinates for the button. The coordinates returned by JButton.getBounds() seem to be relative to the top left corner of the panel. I hoped I could just add those to the coordinates for the panel to get coordinates relative to the table header, but JPanel.getBounds() gives me negative numbers for x and y (?!?). JPanel.getLocation() gives me the same negative numbers. When I tried JPanel.getLocationOnScreen(), I get an IllegalComponentStateException:
    Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
    Can someone tell me how to get coordinates for the button on the JTableHeader? Or is there an easier way to do this (some way to make the buttons actually work so I can just use an ActionListener like I normally would)?
    Here is relevant code:
    public class MyTableHeaderRenderer extends JPanel implements TableCellRenderer {
    public MyTableHeaderRenderer() {
      setOpaque(true);
      // ... set colors...
      setBorder(UIManager.getBorder("TableHeader.cellBorder"));
      setLayout(new FlowLayout(FlowLayout.LEADING));
      setAlignmentY(Component.CENTER_ALIGNMENT);
    public Component getTableCellRendererComponent(JTable table,
                                                     Object value,
                                                     boolean isSelected,
                                                     boolean hasFocus,
                                                     int row,
                                                     int column){
      if (table != null){
        removeAll();
        String valueString = (value == null) ? "" : value.toString();
        add(new JLabel(valueString));
        Insets zeroInsets = new Insets(0, 0, 0, 0);
        final JButton sortAscendingButton = new JButton("1");
        sortAscendingButton.setMargin(zeroInsets);
        table.getTableHeader().addMouseListener(new MouseAdapter(){
          public void mouseClicked(MouseEvent e) {
            Rectangle buttonBounds = sortAscendingButton.getBounds();
            Rectangle panelBounds = MyTableHeaderRenderer.this.getBounds();
            System.out.println(Revising based on (" + panelBounds.x + ", "
                               + panelBounds.y + ")...");
            buttonBounds.translate(panelBounds.x, panelBounds.y);
            if (buttonBounds.contains(e.getX(), e.getY())){  // The click was on this button.
              System.out.println("Calling sortAscending...");
              ((MyTableModel) table.getModel()).sortAscending(column);
            else{
              System.out.println("(" + e.getX() + ", " + e.getY() + ") is not within "
                                 + sortAscendingButton.getBounds() + " [ revised to " + buttonBounds + "].");
        sortAscendingButton.setEnabled(true);
        add(sortAscendingButton);
        JButton button2 = new JButton("2");
        button2.setMargin(zeroInsets);
        add(button2);
        //etc
      return this;
    }

    I found a solution to this: It's the getHeaderRect method in class JTableHeader.
    table.getTableHeader().addMouseListener(new MouseAdapter(){
      public void mouseClicked(MouseEvent e) {
        Rectangle panelBounds = table.getTableHeader().getHeaderRect(column);
        Rectangle buttonBounds = sortAscendingButton.getBounds();
        buttonBounds.translate(panelBounds.x, panelBounds.y);
        if (buttonBounds.contains(e.getX(), e.getY()) && processedEvents.add(e)){  // The click was on this button.
          ((MyTableModel) table.getModel()).sortAscending(column);
    });

  • Multiple buttons for a given validation

    I want the same validation to be done on the click of two buttons. In the "Conditional Validation Processing", I see we can
    "select a button" which allows us to select only one button.
    How can I select multiple buttons for a given validation?
    Is there a way or do I need to create another validation for the second button.
    Please advice.

    When you submit a page with a button the "request" value is set to the button name (not the displayed button label). After-submit events can check the request using :REQUEST or v('REQUEST') so you can build a condition like:   :REQUEST in ('APPLY','CREATE')..or you can use a built-in condition type that checks the request value like 'Request is Contained within Expression 1'.
    Scott

  • Notes interaction pauses slide that contains multiple buttons

    I have several slides, each with a Notes Interaction. As advised, each of the notes is set to Rest of Project and are not resized.
    On the slides with a Notes Interaction, there are multiple buttons made out of Smart Objects. When a button is clicked, an advanced action causes a certain text caption to appear.
    The problem is that the buttons work UNTIL the Notes Interaction appears on the slide. As soon as the Notes Interaction appears, the slide seems to be paused and the buttons that are supposed to show text captions no longer work.
    I'm hoping that someone can help with a solution to this.
    By the way, this only seems to happy when previewing in HTML web browser.

    Jay,
    I had replied in an earlier thread that you need to have ONLY ONE notes interaction in the entire project - Not on every slide. The interaction is designed to be placed only once inside a project. So, placing it in the first slide of your project and setting 'Rest of Project' on it should cater to your need.
    You can choose slide notes or project based notes in the edit panel of the interaction.
    Marcellus

  • Buttons under a state object

    How can I make inactive, a button, in a state object, which is located under?

    @diametrabi – can you elaborate your question a bit more?
    A sceen shot could help. You could attach it when using the forum software:
    Uwe

  • Creating the simplest menu similiar to multiple buttons

    Hi everybody,
    my question is easy. All I want to do is create a simple menu, which does look as a menu, and at the same time works as this exaple:
    <s:HGroup>
         <s:Button label="Start" click="somePlayer.start()"></s:Button>
         <s:Button label="Turn Around" click="car.turn()"></s:Button>
         <s:Button label="Exit" click="myHouse.exit()"></s:Button>
    </s:HGroup>
    I tried using MenuBar and I got really frustrated that every example on the net shows only setting up the labels or icons and not actually linking them in this simple manner. I don't want a dataProvider of XML where I can't set the action that is supposed to happen. I don't want to attach the action somewhere in eventHandler.
    Any straightforward solution? It will be really appreciated!

    I answered to myself by grouping buttons and disabling the button in his state.
    Thanks anyway!

  • How to have button in down state as page opens

    On opening a new "blank" subsidiary page using "getURL",
    there are 2 buttons on the new page. Each button plays a moveclip.
    (The first movieclip is already playing as the new page opens). I'd
    like to have the corresponding button already in the down state as
    the page opens. Is there a conditional statement I could use for
    this? I'm using AS 2.
    The code on each button is as follows:
    on (release){
    _root.resetButtons();
    this.gotoAndStop("down");
    on (rollOver){
    if (this._currentframe <> 3)
    this.gotoAndStop("over");
    on (rollOut, releaseOutside){
    if (this._currentframe <> 3)
    this.gotoAndStop("up");
    Many thanks for any advice.

    Yes, but you'll have to make a bunch of changes. If you
    convert your buttons to movieClips and insert frame labels and
    actions, you can get the resulting movieClip to act as a button.
    Then you can tell one of the button/movieClips to
    gotoAndStop("_over"). It will then start that way and then work
    normally after it is used. Look at
    http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00000230.html,
    for more information using a movieClip as a button.
    Alternately, you could just put in a static graphic of the
    button's over state in place of the button until it should show
    normally, then swap out the graphic for an actual button.

  • Using the same action sequence with multiple buttons and exclusive conditional interactions

    Hi all,
    first of all, pardon me for my english and if I post questions already answered, but I can't find anything about that.
    I'm new to flash and I decided to use Flash Catalyst to speed up the building process of a multimedia presentation for university.
    I have a menu with 10 buttons that change a text box on rollover (I converted it to a button label) and I need to reset the name of the current page on RollOut. Since the action sequence for it is the same of every button on one page, is there a faster way to apply the sequence than repeating it for every button? (I had to do it 10x10=100 times... and what if I made some mistake? )
    Another question is I want to disable the interaction of the menu button of the current page, but conditional interaction let me choose only an "if in state" condition an not a "if not in state". How can I do this? should I simply disable the button on that page?
    Thanks a lot for the help!
    Cheers from Italy

    I answered to myself by grouping buttons and disabling the button in his state.
    Thanks anyway!

Maybe you are looking for

  • GPS /MAPS Nokia n95

    Hey, I Got N95, My MAPS And GPS Ect Dont Seem To Be Picking Upo Anything, They Just Ask For Bluetooth even when i connect to my WLAN nothing happens? Do i need to download anything? Thanks. Josh

  • List versions causing performance problems

    We have a List - not Library - List - with about 100 columns (Yes. We know that's a lot and have verified that one Item wraps to two DB rows), none of which is indexed.  An InfoPath form is used to enter and view the List Items. Versioning is on for

  • How to calculate Sum of records that are not Suppressed

    Hi All Experts, I have Created A layout for SAP B1 in crystal report.Because of Some Condition I have  to Suppress Detail Section. The Suppress Condition is As Follows {ExcisePur.ItemCode}=Previous({ExcisePur.ItemCode}) And {ExcisePur.Batchnum}=Previ

  • Imported Events to External Hard Drive and all Projects refuse to link!

    Hi, I have successfully moved all my iMovie Events to an external hard drive (EHD) as I am running out of space on my Mac. The Events all play fine, iMovie correctly links to them. HOWEVER: All the iMovie Projects I created using these Events are now

  • Latin American Roaming...

    Looks like I'll be spending 10 days in Costa Rica in January and plan to take my iPhone along for ANY stray WiFi that is available. IF I turn my "Data Roaming" and 3G off, is there any way I might get nailed for extra phone charges?