Jump to content
uniGUI Discussion Forums


uniGUI Subscriber
  • Content Count

  • Joined

  • Last visited

  • Days Won


arilotta last won the day on January 23 2018

arilotta had the most liked content!

Community Reputation

6 Neutral

About arilotta

  • Rank
    Active Member

Profile Information

  • Gender
  • Location
    Trieste, Italy

Recent Profile Visitors

182 profile views
  1. arilotta

    Different version for different IDE

    Is it better to install different UniGUI versions on different paths ? Thanks
  2. 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. Andrea
  3. arilotta

    unidbgrid rowselect

    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); begin UniSession.AddJS(UniDBGrid1.JSName+'.view.getNode('+IntToStr(UniDBGrid1.CurrGridRow)+').className = ''x-grid-item x-grid-item-selected''; '); end; @Sherzod, if there is a better solution/implementation, please let me know. Thanks UniDbGrid_indicator_testcase.zip
  4. arilotta

    unidbgrid rowselect

    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
  5. arilotta

    unidbgrid rowselect

    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...
  6. arilotta

    unidbgrid rowselect

    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 ?
  7. arilotta

    uniDbGrid in Runtime

    Thank you, it works. Done this way: procedure TMainForm.UniButton1Click(Sender: TObject); var r: Integer; begin r:=DBgridLista.CurrRow TExUniCustomDBGrid(DBgridLista).DoConfigureJSColumns(DBgridLista.DataSource.DataSet); DBgridLista.CurrRow:=; end;
  8. arilotta

    uniDbGrid in Runtime

    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... thanks Andrea TestHints.zip
  9. arilotta

    Overflowing text, Grid cell tooltip?

    Hi Sherzod, it works perfectly! Thank you !
  10. arilotta

    Overflowing text, Grid cell tooltip?

    Sorry, please consider the attached version ... TestHints.zip
  11. arilotta

    Overflowing text, Grid cell tooltip?

    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 ! TestHints.zip
  12. arilotta

    Overflowing text, Grid cell tooltip?

    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. tm.bind(tip.triggerElement.parentNode); 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)) { tip.update(record.data[parseInt(column.dataIndex)]); } 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 ? Thanks Andrea
  13. arilotta

    ifdef unigui version

    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 Andrea
  14. arilotta

    ifdef unigui version

    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 Andrea
  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 ?