Jump to content
uniGUI Discussion Forums

arilotta

uniGUI Subscriber
  • Content Count

    162
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by arilotta

  1. arilotta

    soWipeShadowSessions what's for ?

    Hi all, according to the documentation, soWipeShadowSessions for UniServerModule is used for: "If not in debug mode, the session will timeout in 30 seconds" But applications compiled in release mode will last according to SessionTimeout nevertheless. So, what's the point of this flag ? Thanks Andrea
  2. Hi all, I'm populating a panel with some components created at runtime, and I can't figure out how their placement on the panel using client side alignment. Let's say I have a panel with Layout HBOX, and I want to populate it with and edit on the left and a label on the right. At design time, it is sufficient to have set the Left property value on the Edit lower than the Left property value on the Label; but at runtime it doesn't work... I've tried setting CreationOrder property too, but nothing changes. This is an example: procedure TvFrame18200.UniButton1Click(Sender: TObject); var e: tuniedit; l:tunilabel; begin l:=tunilabel.Create(self); with l do begin left:=100; createorder:=10; caption:='ciao'; parent:=UniPanel4; end; e:=tuniedit.Create(self); with e do begin left:=0; createorder:=0; parent:=UniPanel4; end; end; The only way to accomplish the desired behaviour is to invert the component creation, but it would complicate coding my application; it is a limitation to create components in the order they will be placed in a panel. Anybody could help me ? Thanks Andrea
  3. arilotta

    Client alignment and runtime object creation

    Thank you Sherzod, it works very well !
  4. arilotta

    MessageDlg supported buttons

    Hi all, it seems that MessageDlg function only supports a few different buttons: - mbOk - mbYes - mbNo - mbCancel I am unable to see mbAll, mbNotToAll, mbRetry, ... Is that something that I could fix ? I really need the All button in addition to Yes and No. Thanks Andrea
  5. arilotta

    MessageDlg supported buttons

    Thank you, with the suggested solution it works. Would it be possible to include all the buttons in the next releases ? Andrea
  6. 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. Andrea
  7. arilotta

    UniDbGrid scroll with dgEditing

    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, Andrea
  8. arilotta

    UniDbGrid scroll with dgEditing

    Yes I did...
  9. arilotta

    TUniCustomDBGrid.MoveToRow(): Unexpected Row number: 0, 3.

    Me too I'm experiencing this error, in not reproduceable situations. Build 1485.
  10. Hayri, thank you very much for the hint, I was unaware of the existence of @@ !
  11. Hello, I need a solution too for the same problem. In the following code: procedure TMainForm.UniButton1Click(Sender: TObject); begin try ShowMask( 'blocking mask...'); unisession.synchronize; sleep(1000); showmessage('step 1'); sleep(1000); showmessage('step 2'); sleep(1000); showmessage('step 3'); finally HideMask; end; end; 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....
  12. arilotta

    Different version for different IDE

    Is it better to install different UniGUI versions on different paths ? Thanks
  13. 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
  14. 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
  15. 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
  16. 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...
  17. 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 ?
  18. 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;
  19. 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
  20. arilotta

    Overflowing text, Grid cell tooltip?

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

    Overflowing text, Grid cell tooltip?

    Sorry, please consider the attached version ... TestHints.zip
  22. 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
  23. 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
  24. 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
×