eduardosuruagy Posted April 23, 2019 Share Posted April 23, 2019 How can I get a hint in the cells of the stringgrid? If the cell has a certain value I can put a different hint. Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted April 24, 2019 Author Share Posted April 24, 2019 Can you do that? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 25, 2019 Share Posted April 25, 2019 16 hours ago, eduardosuruagy said: Can you do that? Maybe you wanted like this? UniStringGrid -> ClientEvents -> ExtEvents -> function afterrender: function afterrender(sender, eOpts) { var me = sender; var view = me.normalGrid.getView(); view.tip = Ext.create('Ext.tip.ToolTip', { target: view.getId(), delegate: '.x-grid-cell', trackMouse: true, listeners: { beforeshow: function updateTipBody(tip) { var tipGridView = tip.target.component; var record = tipGridView.getRecord(tip.triggerElement); tip.update(record.get(tip.triggerElement.cellIndex + me.lockedGrid.getColumns().length)); } } }); } Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted April 25, 2019 Author Share Posted April 25, 2019 5 hours ago, Sherzod said: Maybe you wanted like this? UniStringGrid -> ClientEvents -> ExtEvents -> function afterrender: function afterrender(sender, eOpts) { var me = sender; var view = me.normalGrid.getView(); view.tip = Ext.create('Ext.tip.ToolTip', { target: view.getId(), delegate: '.x-grid-cell', trackMouse: true, listeners: { beforeshow: function updateTipBody(tip) { var tipGridView = tip.target.component; var record = tipGridView.getRecord(tip.triggerElement); tip.update(record.get(tip.triggerElement.cellIndex + me.lockedGrid.getColumns().length)); } } }); } It's almost what I wanted, in fact I created a calendar with the StringGrid and I would like it on some dates when I hover over it to show the description of what is registered in the database, such as a birthday or a holiday. This information who registers is the user. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 25, 2019 Share Posted April 25, 2019 11 minutes ago, eduardosuruagy said: It's almost what I wanted, in fact I created a calendar with the StringGrid and I would like it on some dates when I hover over it to show the description of what is registered in the database, such as a birthday or a holiday. This information who registers is the user. OK Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted April 26, 2019 Author Share Posted April 26, 2019 On 25/04/2019 at 09:27, Sherzod said: Está bem Can you help me with this? Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted April 30, 2019 Author Share Posted April 30, 2019 Can someone help me with this question? Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted May 2, 2019 Author Share Posted May 2, 2019 How can someone help me please? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 3, 2019 Share Posted May 3, 2019 20 hours ago, eduardosuruagy said: How can someone help me please? Hi, Sorry for the late reply, need to analyze On 4/25/2019 at 5:16 PM, eduardosuruagy said: It's almost what I wanted, in fact I created a calendar with the StringGrid and I would like it on some dates when I hover over it to show the description of what is registered in the database, such as a birthday or a holiday. This information who registers is the user. This explanation is not very clear to me. You may need to make a test case by specifying a sequence of actions... Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted May 3, 2019 Author Share Posted May 3, 2019 I made a calendar using StringGrdi and I logged in a table from my database a few holidays, I would like to give a select on my table and on the respective dates I put a hint with the holiday description. As it is in the attached image, the cells in red are holidays, when I hover the mouse over it I wanted it to show the name of the holiday! Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted May 8, 2019 Author Share Posted May 8, 2019 Would anyone know to answer this question? Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted May 10, 2019 Author Share Posted May 10, 2019 I would just like an answer from the staff if this is possible to do or not ... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 10, 2019 Share Posted May 10, 2019 1 hour ago, eduardosuruagy said: I would just like an answer from the staff if this is possible to do or not ... I'm sorry for the late reply It's possible, But for this need to take into account a few points, I will try to make a simple testcase one of these days Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted May 10, 2019 Author Share Posted May 10, 2019 6 minutes ago, Sherzod said: Desculpe pela demora na resposta É possível, mas para isso preciso levar em conta alguns pontos, vou tentar fazer um simples teste um dia desses OK thank you!! Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted May 14, 2019 Author Share Posted May 14, 2019 Would you just like to know if I can get an answer on this? It's been a long time since I asked this question and so far I have not had an answer. Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted May 20, 2019 Author Share Posted May 20, 2019 Is the forum support gone? Not even to give a simple answer stating that you can not do it, we have to wait 30 days for an answer? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 21, 2019 Share Posted May 21, 2019 11 hours ago, eduardosuruagy said: Is the forum support gone? Not even to give a simple answer stating that you can not do it, we have to wait 30 days for an answer? Hi, I'm sorry, forum support does not mean to fully resolve your requests. As I said above, that this is possible, and that was my opinion. And I apologize again for not being able to give you a test case for this at the moment Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted May 21, 2019 Author Share Posted May 21, 2019 55 minutes ago, Sherzod said: Oi, Desculpe, o suporte do fórum não significa resolver totalmente suas solicitações. Como eu disse acima, isso é possível, e essa foi a minha opinião. E peço desculpas novamente por não ser capaz de lhe dar um caso de teste para isso no momento Still, thank you very much for your help! Quote Link to comment Share on other sites More sharing options...
MOGSY Posted March 24, 2020 Share Posted March 24, 2020 Hi Sherzod It is very usful if possible to pass the text to be displayed to tool tip dynamically. regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 25, 2020 Share Posted March 25, 2020 7 hours ago, MOGSY said: It is very usful if possible to pass the text to be displayed to tool tip dynamically. Hi, Something like this. function afterrender(sender, eOpts) { var me = sender; var view = me.normalGrid.getView(); view.tip = Ext.create('Ext.tip.ToolTip', { target: view.getId(), delegate: '.x-grid-cell', trackMouse: true, listeners: { beforeshow: function updateTipBody(tip) { return me.cellTip ? tip.update(me.cellTip) : false; } } }); } procedure TMainForm.UniFormCreate(Sender: TObject); begin UniStringGrid1.JSInterface.JSProperty('cellTip', ['tip']); end; procedure TMainForm.UniButton1Click(Sender: TObject); begin UniStringGrid1.JSInterface.JSAssign('cellTip', ['tip1']); end; But you also need to think about these form events: deactivate and activate, which are called upon activation, deactivation tooltip! Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted March 25, 2020 Author Share Posted March 25, 2020 7 hours ago, Sherzod said: Hi, Something like this. function afterrender(sender, eOpts) { var me = sender; var view = me.normalGrid.getView(); view.tip = Ext.create('Ext.tip.ToolTip', { target: view.getId(), delegate: '.x-grid-cell', trackMouse: true, listeners: { beforeshow: function updateTipBody(tip) { return me.cellTip ? tip.update(me.cellTip) : false; } } }); } procedure TMainForm.UniFormCreate(Sender: TObject); begin UniStringGrid1.JSInterface.JSProperty('cellTip', ['tip']); end; procedure TMainForm.UniButton1Click(Sender: TObject); begin UniStringGrid1.JSInterface.JSAssign('cellTip', ['tip1']); end; But you also need to think about these form events: deactivate and activate, which are called upon activation, deactivation tooltip! Obrigado!! Quote Link to comment Share on other sites More sharing options...
MOGSY Posted March 26, 2020 Share Posted March 26, 2020 Hi For some reason when I tried this code, the system crasshes and displays a blue screen window. Does it work at your side? I have upgraded mu UniGui to the latest realease "1.90.0.1525". Regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 26, 2020 Share Posted March 26, 2020 1 hour ago, MOGSY said: For some reason when I tried this code, the system crasshes and displays a blue screen window. Hi, Sorry, really? Can you see the logs further? Perhaps the problem lies elsewhere? Quote Link to comment Share on other sites More sharing options...
MOGSY Posted March 26, 2020 Share Posted March 26, 2020 Hi Following is what displays. If the the js code is removed then it works normal. regards Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 26, 2020 Share Posted March 26, 2020 11 minutes ago, MOGSY said: Following is what displays. If the the js code is removed then it works normal. What do you see in the browser console? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.