Jump to content
uniGUI Discussion Forums


uniGUI Subscriber
  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by arilotta

  1. Hi all,

    I would like to scroll with key arrows up and down the grid, even when the grid is in editing mode.

    I already enabled KeyNavigation in WebOptions, but the grid is navigable using the keys only when not in editing mode.

    When in editing mode, pressing arrow down, it is the same as pressing key END, that is it moves the cursor to the end of the text; while pressing arrow up,

    it moves the cursor to the beginning of the text.

    I would like that pressing arrow down, the current record is posted, and the dataset moves to the next record,

    while when pressing arrow up, the current record is posted, and the dataset moves to the previous record.

    Could that be achieved in some way ?

    Thanks to all the contributors,


  2. Hi, I need to exchange at runtime the order of some panels in a container whose layout is vbox or hbox.

    Let's say that at design time there is a container with Layout=vbox, with two children panels: Panel1 and Panel2.

    At runtime they are positioned based on their Top value at design time, so for example Panel1 before Panel2.

    How is it possible to excange their order/position at runtime ? I need the possibility to move Panel2 before Panel1...

    Thanks in advance.


  3. Hello, I need a solution too for the same problem.

    In the following code:

    procedure TMainForm.UniButton1Click(Sender: TObject);
        ShowMask( 'blocking mask...');
        showmessage('step 1');
        showmessage('step 2');
        showmessage('step 3');

    the mask disappears between step 1 and step 2.

    The same behaviour applies to MessageDlg and ShowModal...

    Is there a solution ? Blocking masks should remain until they are explicitely hidden with command HideMask,

    this is the reason for putting them in a try.. finally block....


  4. Hi all,

    we would like to adopt HyperServer in our production environment, and we are undecided between:

    -  ISAPI Module Mode with Apache

    - Windows Service Mode

    UniGUI documentation states that both methods are suitable for production, we would like to know which one is the best in terms of:

    - performance

    - robustness

    And what are the advantages/drawbacks of the two methods ?

    Many thanks to anybody will share their experience/knowledge to help us choose the best solution.


  5. Hi, 

    I managed it to work, I attached a sample for anyone interested in.

    Basically, I replaced

    - all the occurrences of 'x-grid-row x-grid-data-row x-grid-row-selected' with 'x-grid-item x-grid-item-selected'

    - all the occurrences of 'x-grid-row x-grid-data-row' with 'x-grid-item'

    - I moved the initialization of the style from event OnAfterLoad to event OnSelectionChange:

    procedure TMainForm.UniDBGrid1SelectionChange(Sender: TObject);
      UniSession.AddJS(UniDBGrid1.JSName+'.view.getNode('+IntToStr(UniDBGrid1.CurrGridRow)+').className = ''x-grid-item x-grid-item-selected''; ');

    @Sherzod, if there is a better solution/implementation, please let me know.




  6. Hi Sherzod, I've attached a simple testcase. 

    I am trying to show a grid indicator on the first column of a grid, when dgRowSelect=FALSE, to show the user the current record.

    I don't want to use the standard cell color background to show the selected cell.

    Just see the SerUniDbGrid_indicator_testcase.zipverModule.CustomCSS; the supplied  image "right-arrow-button.png" should be put where the EXE is compiled (Win32\Debug)

    In the Main OnFormCreate I manage the grdi events cellModel.deselect and cellModel.selectionchange

    In addition in the grid OnAfterLoad event I force the "right-arrow-button" to have the style applied when the grid is loaded at the beginning.

    This solution used to work in EXTJS4, while in the newer EXTJS6 it has some problems, it hangs frequently.

    Just click on the grid, changing row and column to see the problem.

    Is there a better solution with EXTJS6 to achieve the desired behaviour ?

    Thank you

  7. No, I'm using cellModel.selectionchange and cellModel.deselect as above to draw a grid indicator on the first column,

    when grid has dgRowSelect=false and dgEditing=true

    See also my post: 

    Now this code is not working anymore...

  8. Hi Sherzod, the above approach is not working anymore in the new EXTJS.

    I tried to replace:

    - "x-grid-row x-grid-data-row"  with "x-grid-item"

    - "x-grid-row x-grid-data-row x-grid-row-selected"  with "x-grid-item x-grid-item-selected"

    but I did not work.

    Could you help me ?

  9. Thank you, it works. Done this way:

    procedure TMainForm.UniButton1Click(Sender: TObject);
    var r: Integer;

  10. Hi Sherzod,

    going on porting our SW to EXTJS 6.

    I used the above solution to open/close the filters at runtime, and in EXTJS 4.2 it worked pretty well.

    In EXTJS6.5 calling "DoConfigureJSColumns"  makes the DbGrid lose the selection, the selected record is no longer highlighted

    and you need to click on the grid to select it again.

    Please find attached a simple test application, just select a record and push the ConfigureJSColumns button to recreate the issue.

    I tried to call something like:

    JSInterface.JSCall('view.refresh', []);

    but it does not work...




  11. Dear Sherzod, here your are. Please find attached a simple project. Look the two attached images:

    it seems that the computed width of the text in grid columns is not accurate.

    In image Hint_not _shown the hint should appear, because the text is not completely visible (it is cut).

    Just play resizing column PRESTAZIONE, you will find easily the problem.

    In the main form OnCreate event you can find the function "function viewready" used to prompt the hint, already reported above in the post.

    Please let me know

    Thanks !





  12. I also used this piece of code to show tolltips when text was longer then cell width.

    Because I use custom fonts, I added just the following statement (after many attempts) to determine exactly

    the real size of the text.

    function viewready(sender, eOpts)
        var tm = new Ext.util.TextMetrics();
        sender.view.tip = Ext.create('Ext.tip.ToolTip', {
            target: sender.view.el,
            delegate: sender.view.cellSelector,
            trackMouse: true,
            renderTo: Ext.getBody(),
            listeners: {
                beforeshow: function updateTipBody(tip) {
                    gridColums = sender.view.getGridColumns();
                    column = gridColums[tip.triggerElement.cellIndex];
                    record = sender.view.getRecord(tip.triggerElement.parentNode);
                    tm.bind(tip.triggerElement.parentNode); /* added this ! */
                    if (column.dataIndex !== '-1' && (column.getWidth() < (tm.getSize(record.data[parseInt(column.dataIndex)]).width) + 5)) {
                    } else {
                        return false;

    Unfortunately, with the latest release with EXTJS 6.5, the previous code does not work well anymore, in fact the text width is not computed

    precisely anymore. Also with the new properties ShowToolTip for DBGrid columns , the width is not computed correctly, so many times the tooltip is not shown

    whereas it should be.

    My guess is that, due to the changed DBGrid structure in EXTJS 6.5, the element accessed with "tip.triggerElement.parentNode" is a wrong one.

    Does someone have a suggestion ?




  13. Hi Sherzod, 

    the linked post says that it is possible to have 2 different builds of Unigui on two different Delphi installations, and this

    would be very interesting. Could you supply installation instructions for such a configuraion ?

    But my question was a bit different.

    I would like to be able to have one single project, and compile it with two different Unigui builds.

    Where necessary, using a conditional define, I would like to compile different statements

    in order to be compatible with the compiling version.

    Hoping to have been clearer,

    thank you


  14. Hi all,

    I'm also trying to port my projects from release 1.00 to 1.50, and I'm finding many incompatibilities in CSS and JS.

    Is there a way to use a conditional compilation to differentiate the code based on the installed UniGUI build ?

    Something like:

      { IFDEF UNIGUI1.00}
    // old code

      { ELSIF UNIGUI1.50}

    // new code
      { ENDIF}

    Thanks in advance 


  15. Hi, thanks to all of you for the replies. 

    In fact I think that Volk65 is right, while Abaksoft is a little too strict.

    "global" procedures that do not access (in update mode) global variables should be fine.

    The issues arise when a global variable is set, while the following should be safe in a "global" procedure not belonging to a class:

    - create/read/set a local object

    - read/set procedure params

    - read a global variable

    What do you think ?

  16. Hi all,

    I was wondering if it is safe to use procedures not belonging to a class in UniGUI, for example:

    function IfThenElse(Condizione: Boolean; CondTrue: string; CondFalse: string): string;
      if Condizione then
        Result := CondTrue
        Result := CondFalse;

    In the documentation, it is specified to not use global variables, but nothing is told about global procedures.

    Thanks for all the replies.


  17. I need to popup a dialog when the user presses F2 that allows them to insert custom pre-configured text in the component.

    Gerhard IV, your point is true, I changed the JS supplied by Sherzod in the following way, passing therefore only the F2 key via Ajax:

    function initialize(sender, eOpts)
          var me=sender;
        me.getDoc().addEventListener("keydown", function(e){
          if (e.keyCode==113) {
            ajaxRequest(me, 'keydown', ['key='+e.keyCode])


  18. Hi all, I'm very interested in this.

    We have a couple of applications written with build 1425 (ExtJS 4.2), and we want to plan the upgrade to the latest version, usign ExtJS 6.5.

    We need to test all the customizations that we made to the CSS and the custom JS code developed, in order to be sure it is compatible

    with Ext JS 6.5, and to change it were needed.

    In the meanwhile, we need to support the projects, so we need to be able to fix eventual issues and to upgrade them.

    Which is the most convenient way to have different versions of UniGUI installed on the same RAD Studio?

    It is necessay to change folder names to activate one version instead of another ? What about registry ?


    Please provide some simple steps (including installation) in order to have a development environment with multiple UniGUI versions.