Jump to content

Dimitri

Members
  • Posts

    22
  • Joined

  • Last visited

Posts posted by Dimitri

  1. It works ! Thanks.

     

    function reconfigure(sender, store, columns, oldStore, oldColumns, eOpts) {
      var grid = sender;
    
      for (var i = 0; i < columns.length; i++) {
        if (columns[i].getEditor()) {
          columns[i].getEditor().on('specialkey', function(field, e) {
            if (e.getKey() == 13) {
              ajaxRequest(grid, "BeforeCellKeyDown", ["keycode=13"], false);
              return e.keyCode;
            }
          })
        }
      }
    }

     

  2.  

    I use the BeforeCellKeydown event in ClientEvents.Ext Events :

    beforecellkeydown=function beforecellkeydown(sender, td, cellIndex, record, tr, rowIndex, e, eOpts)
    {
      var key = e.getKey();
      ajaxRequest(this, "BeforeCellKeyDown", ["keycode="+key], false);
      return true;
    }

    Then on the UniDBGRid1.OnAjaxEvent :

    procedure TMainForm.UniDBGrid1AjaxEvent(Sender: TComponent; EventName: string;
      Params: TUniStrings);
    var
      lKey: Integer;
    begin
      if EventName = 'BeforeCellKeyDown' then
      begin
        lKey := Params['keycode'].AsInteger;
        UniMemo1.Lines.Add(IntToStr(lKey));
      end;
    end;

     

    When you are editing a cell, the key pressed is displayed in the memo to the right of the grid. For example, if I press the "A" key, the number 65 is displayed in the memo. If I press the "Tab" key, the number 9 is displayed in the memo. But I can't display the number of the "Return" key in the memo. It also doesn't work with the "Escape" key.

  3. Hi,

    I emulate with uniGUI a Desktop system, using a UniGUIForm which is always maximized and accepting other forms inside
    This desktop form is borderless and always resized to stay maximized on screen, and a button will create a new form inside of it
    If this 2nd " folder " form is maximized, upon resizing the browser, the form will resize itself, but there will be a gap of one action. That is to say, if I size down the browser, the folder form will not change, this time ; but when I resize it up, it will take the size he should have taken with the previous action

    What should I do in order to make the folder form resize itself without that resize action delay ?

    I have made a little project to show the problem in action

    Thank you

    UniGUI version : 1.90.0.1513

    Windows.zip

  4. Hi,

    I use the function keys (F3 for example) to open modal form with the OnKeyDown event of a grid.
    After closing this modal form I focus the grid to get back.

    UniSession.AddJS (FDbGrid.JSName + '. Focus ();');

    Then F3 key no longer opens a modal form but opens my browser search.

    How to correctly force the focus on a TUniGrid component?

    Thank you

    UniGUI: 1.50.0.1484

×
×
  • Create New...