bbm Posted September 7, 2016 Share Posted September 7, 2016 I have a column in a DBGrid which shows different images. Behind the images there is a function to start. How can I change the cursor of this special column? Best regards. Link to comment Share on other sites More sharing options...
Sherzod Posted September 7, 2016 Share Posted September 7, 2016 Hi, If I understand correctly you, can you try this approach?! UniDBGrid->OnAfterLoad event: procedure TMainForm.UniDBGrid1AfterLoad(Sender: TUniDBGrid); var colindx: byte; begin // your Column Index colindx := 2; UniSession.AddJS('var ColCells = ".x-grid-cell-headerId-"+'+ (Sender as TUniDBGrid).JSName +'.columnManager.columns['+ IntToStr(colindx) +'].id;'+ 'Ext.select(ColCells).setStyle("cursor", "pointer");' ); end; Best regards. Link to comment Share on other sites More sharing options...
bbm Posted September 7, 2016 Author Share Posted September 7, 2016 Many thanks!!!!! It works great. Best regards Link to comment Share on other sites More sharing options...
Freeman35 Posted September 7, 2016 Share Posted September 7, 2016 @Delphi Developer and @Farshad Mohajeri Hello, I'm still try covert my delphi project's one form to unigui. there is no help no any documents. Ist it possible, your and other answer share in on topics? and I think will be much better, example be in form. just share this pas and dfm via zip file in topic or download section. For example I don't how to change label form color etc. another one, TUnidbEdit (TUniEdit as well) OnChange events NOT work like delpi's. In delphi, if data move next or previus, dbedit onchange event triggered. looking for this, but I couldn't find any helph about that. Topic can bi read only like "Feature Requests" and just moderators add message and files. regards Link to comment Share on other sites More sharing options...
jahlxx Posted December 21, 2016 Share Posted December 21, 2016 The post of DD changes the cursor when the mouse is over the image column. And what about a hint? Is possible to show a hint in some columns of the gris when the mouse is over? Thanks. Link to comment Share on other sites More sharing options...
Sherzod Posted December 21, 2016 Share Posted December 21, 2016 Hi, And what about a hint? Is possible to show a hint in some columns of the gris when the mouse is over? Can help you, try: http://forums.unigui.com/index.php?/topic/4029-how-to-put-a-hint-on-a-tunidbgrid-column-or-maybe-only-on-the-title-of-the-column/ http://forums.unigui.com/index.php?/topic/6712-overflowing-text-grid-cell-tooltip/ Best regards. Link to comment Share on other sites More sharing options...
jahlxx Posted January 19, 2017 Share Posted January 19, 2017 Hi. Both options are ok. I think, to show hint, the first is better. The problem is that only show hint when mouse is over the column title. How can show the hint in the whole column? Link to comment Share on other sites More sharing options...
Sherzod Posted January 19, 2017 Share Posted January 19, 2017 Hi, Do you want like this ?!: function reconfigure(sender, store, columns, oldStore, the, eOpts){ var tip = Ext.create('Ext.tip.ToolTip', { //for all columns target: sender.headerCt.id, html: '<b>T</b>est' }); } Best regards. Link to comment Share on other sites More sharing options...
jahlxx Posted January 19, 2017 Share Posted January 19, 2017 Hi. Not exactly. I need to show hint, when the mouse is over a column, i.e. column 0. And show the hint when the mouse is in any cell of that column. Thanks. Link to comment Share on other sites More sharing options...
bbm Posted April 7, 2018 Author Share Posted April 7, 2018 Hi, how can I change the cursor of a special column in the version 6.5.3? The script of DD is not working anymore. Best regards Link to comment Share on other sites More sharing options...
Sherzod Posted April 7, 2018 Share Posted April 7, 2018 Hi, Hi, how can I change the cursor of a special column in the version 6.5.3? The script of DD is not working anymore. Best regards One possible fast solution I think: procedure TMainForm.UniDBGrid1AfterLoad(Sender: TUniDBGrid); var colindx: byte; begin // your Column Index colindx := 2; UniDBGrid1.JSInterface.JSCode('var me='#1'; Ext.defer(function(){Ext.select(me.columnManager.columns['+ IntToStr(colindx) +'].getCellSelector()).setStyle("cursor", "pointer")}, 100);'); end; Best regards, Link to comment Share on other sites More sharing options...
bbm Posted April 8, 2018 Author Share Posted April 8, 2018 Hi, does not work. Best regards, Bernd Link to comment Share on other sites More sharing options...
Sherzod Posted April 8, 2018 Share Posted April 8, 2018 Hi, does not work. Can you try to increase the second arg for Ext.defer, 500 or 1000 instead of 100? Link to comment Share on other sites More sharing options...
bbm Posted April 8, 2018 Author Share Posted April 8, 2018 Hi, thank you, it is working fine now. I had a little fault in the source. It is also working with 100. Best regards and thank you again. Link to comment Share on other sites More sharing options...
Mirco Posted March 20, 2019 Share Posted March 20, 2019 Sorry but for me do not work. I use C++Builder and I have translated delphi code to: Sender->JSInterface->JSCode( "var me='#1'; Ext.defer( function(){Ext.select(me.columnManager.columns[" +IntToStr( index) +"].getCellSelector()).setStyle(\"cursor\", \"pointer\")}, 100);"); I have missed somethings? thanks! Link to comment Share on other sites More sharing options...
Sherzod Posted March 21, 2019 Share Posted March 21, 2019 18 hours ago, Mirco said: Sorry but for me do not work. Are you using this code after UniDBGrid -> OnAfterLoad event? Link to comment Share on other sites More sharing options...
Mirco Posted March 21, 2019 Share Posted March 21, 2019 Yes the code is inside OnAfterLoad event Link to comment Share on other sites More sharing options...
Sherzod Posted March 21, 2019 Share Posted March 21, 2019 19 hours ago, Mirco said: I use C++Builder and I have translated delphi code to: Sender->JSInterface->JSCode( "var me='#1'; Ext.defer( function(){Ext.select(me.columnManager.columns[" +IntToStr( index) +"].getCellSelector()).setStyle(\"cursor\", \"pointer\")}, 100);"); I have missed somethings? not sure something is missing here However, can you try to use ClientEvents too? UniDBGrid -> ClientEvents -> ExtEvents -> function store.load: function store.load(sender, records, successful, operation, eOpts) { me=this.grid; colIndx=2; Ext.defer(function() { Ext.select(me.columnManager.columns[colIndx].getCellSelector()).setStyle("cursor", "pointer") }, 500); } Link to comment Share on other sites More sharing options...
Sherzod Posted March 21, 2019 Share Posted March 21, 2019 If you want for all cells on the grid, you can use: UniDBGrid.CellCursor property Link to comment Share on other sites More sharing options...
Mirco Posted March 21, 2019 Share Posted March 21, 2019 No, I need 2 cell of 5 because only 2 have the onClick event to start a new page Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now