Jump to content

arilotta

uniGUI Subscriber
  • Posts

    187
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by arilotta

  1. Hi, I'm trying to achieve the grid indicator feature by adding as the first column and image showing a triangle that resembles the well known standard Delphi grid indicator. The problem I am facing here is that it has to be shown only on the selected row, while it should be hidden for all the other rows. Ideas on how to achieve this ? Thanks
  2. Thank you Hayri for letting me know. Regards Andrea
  3. Sure, I've prepared a simple test case, see link below on Google Drive. It is quite simple: under the UniDbGrid Options section there is the dgIndicator flag, which is supposed to show the grid indicator in the first column of the selected row (a small triangle). At runtime, on the contrary, no grid indicator is shown even though dgIndicator is true. https://drive.google.com/open?id=0BweO-SJUx1waaEVJUURoT3A1Sjg Thank you
  4. Hi, how is it possible to disable header highlighting in a UniDbGrid? I disabled MenuEnabled in the column settings, but the header is still highlighted on mouse over. Thanks Andrea
  5. Hello, even though I enable the dgIndicator in UniDbgrid, and the relative column column is added, at runtime I don't see any indicator. Am I missing something ? Thanks Andrea
  6. Yes, that's the idea, and it works as you would expect in a mobile browser. No difference between a FireMonkey app with TWebBrowser component and Chrome mobile browser. Regarding the login form, I use a TUnimLoginForm form. Then if from the main form you specify "ModalResult:=mrOk;" you'd go back to login form. It works perfectly, as in the mobile browser.
  7. Hi, I've used the login form (TUniLoginForm) on a desktop unigui application, but as far as I can see it is not called in a mobile (touch) uniGui application. Is that correct ? Kind regards Andrea
  8. I found the issue was the standard port 8077 used by uniGui; for some strange reason moving the port to 8080 made the site available to TWebBrowser. The port 8077 was reacheable by mobile Chrome, then I think it is a limitation of TWebBrowser component...
  9. Delphi Dev, as always, thank you. I've reposted the message to the appropriate forum " uniGUI Mobile" Andrea
  10. I'm unable to open a unigui mobile site from a FireMonkey app using the TWebBrowser component, I always get "Invalid session or session timeout. restart Application". If I open the website from a mobile browser (Chrome) everything works smoothly. Is there something I'm missing ? Thanks Andrea Arilotta
  11. First of all, I apologize for posting to this group, uniGUI Mobile is more appropriate but unfortunately I'm not allowed to add posts to that group... Is there any reason ? I've bought the complete version... Now, the issue. I'm unable to open a unigui mobile site from a FireMonkey app using the TWebBrowser component, I always get "Invalid session or session timeout. restart Application". If I open the website from a mobile browser (Chrome) everything works smoothly. Is there something I'm missing ? Thanks Andrea Arilotta
  12. Thank you Delphi Dev, it works using the "selectPathById" function. It is necessary to know in advance the node ID, and it is somehow tricky to get that value. However I managed to get that value directly from the query (using Oracle). For anyone that's interested in, the node index ranges from zero to N-1 (number of nodes minus 1). The first root node gets a 0 index, the second root node a 1 index, ... The first node at level 1 (child of a root node) gets a J index, given J the number of root nodes, and so on Maybe clearer with an example: N1 Index 0 N11 Index 3 N12 Index 4 N2 Index 1 N21 Index 5 N22 Index 6 N3 Index 2 N31 Index 7 N311 Index 9 N312 Index 10 N32 Index 8
  13. Ok, I shared the tets case on Google Drive. Please download the test case from the following link: https://drive.google.com/open?id=0BweO-SJUx1wacVNYR01ma0I2S0E Steps to reproduce the issue: 1. Click "1. Fill dataset" to populate the dataset 2. Click "2. Locate root" to move the active record to the root 3. Click "Expand Selected Node" to expand it --> it works 4. Click "FullCollapse" 5. Click "3. Locate Child1" to move the active record to Child1 6. Click "Expand Selected Node" to expand it --> doesn't work, nothing happens Repeat steps 4..6 changing the node to locate, locating GrandChild1 and then GrandChil3: same behaviour the node is not made visible. If I change "cascadeBy" with "bubble", strangely, the behaviour is the same. Thank you
  14. Hi Delphi Dev, please let me know how to attach the test case, I can't see the option in the forum... Thanks Andrea
  15. Hi, I know it seems ridicolous, but I can't figure out how to attach a file to a post ... Andrea
  16. Thank you, after analyzing the link you've posted, I find a solution, I'm posting it here just in case anyone has the same problem: ---------------------------------------------------------------- In main form: MyForm.Initialize(..., ...) In MyForm: procedure TMyForm.UniFormCreate(Sender: TObject); begin // form initialized as not visible self.ClientEvents.ExtEvents.Add ('window.afterlayout=function afterlayout(sender, layout, eOpts)'+ ' { Ext.get(sender.id).el.setVisible(false); }'); end; procedure TMyForm.Initialize(..., ...); begin try // form initialization... raise Exception.Create('some error'); ShowModal; UniSession.AddJS('setTimeout(function(){'+self.WebForm.JSName+'.el.setVisible(true); }, 0)' ); except TMRClose.Enabled:=true; self.Close; end; end; procedure TMyForm.TMRCloseTimer(Sender: TObject); begin // TMRClose is a TUniTimer with Interval=1, RunOnce=true self.Close; end;
  17. Thank you, your solution fully expands a branch from a starting node, but I need to go up the tree and expand the parents rather than the children. On the Sencha documentation, I found the function "bubble" that should do the trick. Unfortunately, if I substitute "cascadeBy" with "bubble" and an hidden node is selected, it doesn't work. Let me explain a bit more my problem. I have a hierarchical query bound to a TUniDbTreeGrid; when I open the form the tree is fully collapsed; then I change the active record on the query by code using a Locate. If the new active record is not on the root level, and it is a child, and the tree is collapsed, I need that node to be expanded, in order to have the selection visible. I really appreciate the time you are spending with me. Thanks
  18. Hi, using VCL I usually create a form and initialize it calling a "startup" method; thsi method is repsonsible to set up the form, open the queries and finally display the form. During that phase, if an exception is raised implicitely or explicitely, the relative message is shown to the user and the form is not shown. Something like this: with TMyForm.Create(self) try Initialize(.., ...); finally Free; end; procedure TMyForm.Initailize(..., ...); begin // form initialization... raise Exception.Create('some error'); ShowModal; end; In the above example, the form is created, the Initailize method is executed until the exception, finally the form is freeid. I'm unable to achieve the same behaviour with UniGUI, as it seems that the forms are automatically shown after being created. I've tried something like this, but it gives a Javascript error: procedure TMyForm.Initailize(..., ...); begin try // form initialization... raise Exception.Create('some error'); ShowModal; except self.Close; end; end; Is there a solution ? Or, which is the best way to initialize a form ? Andrea
  19. In other words, I would like to achieve something like the VCL TTreeNode.MakeVisible method. Thanks Andrea
  20. Hi, I've tried the 2nd solution, and it works, but I would like to expand the branch all the way up starting from the selected node. The supplied code expands just the selected node. I've tried somethign like this, trying to get the parent node, and expand it, but it didn't work: function beforeInit(sender, config) { var me = sender; me.expandSelectedNode = function() { var _selection = me.getSelectionModel().getSelection()[0]; if (_selection) { var _parent = _selection.get('parentNode'); if(_parent) { _parent.set('expanded', 'true'); }; }; }; }
  21. Yes, they work, but I would like to expand only the branch with the selected record, not the whole tree. Thanks
  22. Hi, I know it is possible to fully expand/collapse a UniDBTreeGrid. What I'm trying to achieve is to only expand the branch that contains the selected record. Looking at Sencha documentation, it seems there is the "expand" method, so I've tried something like this: UniDBTreeGrid1.JSInterface.JSCall('expand', ['key id', true]); Unfortunately, it doesn't work. Any ideas ?
  23. Hi, I have the same problem; it would be useful to have the opportunity to order the tree nodes at the same level (siblings) by a desired field. Andrea
×
×
  • Create New...