AlbertoMeyer Posted August 15, 2023 Share Posted August 15, 2023 Is it possible to paint the background of a cell outside the OnDrawCell event? For example, when clicking on a button, a cell is painted with a certain color. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 16, 2023 Share Posted August 16, 2023 Hello @AlbertoMeyer Please explain in more detail. Quote Link to comment Share on other sites More sharing options...
AlbertoMeyer Posted August 16, 2023 Author Share Posted August 16, 2023 I have a stringgrid with values. I need to color certain cells with a yellow background, for example, from an event, like a button click, not during the ondrawcell event. In tms grid, for example, you can use grid.cell[3,4].color := clyellow. Is it possible? Quote Link to comment Share on other sites More sharing options...
AlbertoMeyer Posted August 17, 2023 Author Share Posted August 17, 2023 Any additional information? This is a fundamental function for my system. Intraweb does this normally. I need to decide whether to renew the Unigui or Intraweb license based on this. It may sound silly, but it's fundamental to part of my application. I would like to continue with Unigui. I bought Unigui several years ago and never used. Trying to make happend Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 17, 2023 Share Posted August 17, 2023 15 minutes ago, AlbertoMeyer said: Any additional information? This is a fundamental function for my system. Intraweb does this normally. I need to decide whether to renew the Unigui or Intraweb license based on this. It may sound silly, but it's fundamental to part of my application. I would like to continue with Unigui. I bought Unigui several years ago and never used. Trying to make happend Hello, This post may help you: Quote Link to comment Share on other sites More sharing options...
AlbertoMeyer Posted August 17, 2023 Author Share Posted August 17, 2023 It works. Thank you very much Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 17, 2023 Share Posted August 17, 2023 Great, thanks. Quote Link to comment Share on other sites More sharing options...
AlbertoMeyer Posted August 17, 2023 Author Share Posted August 17, 2023 When i call Quote grid.JSInterface.JSCode(#1'.rc[2][0]="background-color:yellow; color:black";'#1'.view.refresh();'); I lost the aligmnement define in on drawcell. Attribs.Style.Style := 'text-align: center !Important'; Any tips on this? thanks Quote Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 18, 2023 Share Posted August 18, 2023 16 hours ago, AlbertoMeyer said: I lost the aligmnement define in on drawcell. Attribs.Style.Style := 'text-align: center !Important'; Try to include this CSS text-align property as well: 16 hours ago, AlbertoMeyer said: grid.JSInterface.JSCode(#1'.rc[2][0]="background-color:yellow; color:black";'#1'.view.refresh();'); Quote Link to comment Share on other sites More sharing options...
AlbertoMeyer Posted August 18, 2023 Author Share Posted August 18, 2023 Can you, please, post, an example? I am really newbie on this Quote Link to comment Share on other sites More sharing options...
AlbertoMeyer Posted August 18, 2023 Author Share Posted August 18, 2023 I achieved. Thank you again 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.