Menu

Custom Buttons

Help
don
2007-09-27
2013-04-03
  • don

    don - 2007-09-27

    Hi there,

    Just curious if there is an easy way to add buttons to the FormWindow with custom events attached to them...

    Example of what I mean in:

    Button myButton = Button("Name Alert");
    myButton.addClickListener( new ClickListener() {
      public void onClick( Sender w ) {
         Client c = (Client)selRow;
         Window.alert("Client name: "+c.getName();
      }
    });
    form.add(myButton);

    Now there would be a button on the CustomFormWindow so that when you select a row and click on the button it would show an alert with the Client name.

    Not sure if there is already something to facilitate this or not.

    Let me know, Thanks very much,

    Don

     
    • Skalyuk Andrij

      Skalyuk Andrij - 2007-09-30

      We plan to create mechanism of integration external visual components into framework.

      Now we have architecture with monolith visual part with window manager. It provide communications between windows, that generated by framework.

      For your task you can use solution with View form. This is the form for single row viewing. It can show asynchronous loaded data. Accordingly it can show any information by form elements (even reference book).

      Describe your task more exactly. So we try to help you.

       
    • don

      don - 2007-10-01

      Basically what I need is to pop up a dialog box that is aware of the currently selected row.  That way I can completely custom code that dialog, using the row that is selected.

      It sounds like your first sentence described what I need: "integration external visual components into framework".

      I am going to have to write something to facilitate that very soon.

       
    • don

      don - 2007-10-04

      I've solved this myself by creating an "ICustomDialogProvider" that can be added as an IActionProvider in Reference Books to run custom code that is aware of the selected IDataRow

       
      • Skalyuk Andrij

        Skalyuk Andrij - 2007-10-05

        Very interesting. Can you show your changeset ?

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.