rhennink Posted March 13, 2017 Share Posted March 13, 2017 Hi, I would like to do some more drawing on the Cell in TUniStringGrid. For example, I would like to draw a Border around a Cell if it has a specific value, or to draw a small rectangle in it. How can we do that?? Ricahrd Link to comment Share on other sites More sharing options...
mhmda Posted March 13, 2017 Share Posted March 13, 2017 You can just control the text style, if you want to draw a border it is more complicated than you think, it is web not desktop. Link to comment Share on other sites More sharing options...
Sherzod Posted March 16, 2017 Share Posted March 16, 2017 Hi, Hi, I would like to do some more drawing on the Cell in TUniStringGrid. For example, I would like to draw a Border around a Cell if it has a specific value, or to draw a small rectangle in it. How can we do that?? Ricahrd You can analyze this demo example: \FMSoft\Framework\uniGUI\Demos\Desktop\GridCellStyle Best regards. Link to comment Share on other sites More sharing options...
rgreat Posted December 22, 2020 Share Posted December 22, 2020 On 3/16/2017 at 11:18 PM, Sherzod said: Hi, You can analyze this demo example: \FMSoft\Framework\uniGUI\Demos\Desktop\GridCellStyle Best regards. UniDBGrid have nice event - OnFieldImage. Can I have similar functionality in UniStringGrid? In any way, except adding <img src="..."> tag into cells manually? I need to render images in UniStringGrid cells. And that's the difference between: http://www.unigui.com/doc/online_help/api/uniGUITypes_TUniCellAttribs_DefaultColor.html and http://www.unigui.com/doc/online_help/api/uniGUITypes_TUniCellAttribs_Color.html ? Link to comment Share on other sites More sharing options...
Tokay Posted February 14, 2021 Share Posted February 14, 2021 Do up the topic. Does it possible to draw an image inside the TUniStringGrid components? Any way is accepted. I don't want to move to the DB grid component in some locations. I've found unclear solution here: Quote Cells[1,1] := ''; but don't know how to implement it. Link to comment Share on other sites More sharing options...
Tokay Posted February 18, 2021 Share Posted February 18, 2021 Up Link to comment Share on other sites More sharing options...
Sherzod Posted February 18, 2021 Share Posted February 18, 2021 8 minutes ago, Tokay said: Up Actually, UniStringGrid is not meant for this. Link to comment Share on other sites More sharing options...
Sherzod Posted February 18, 2021 Share Posted February 18, 2021 15 minutes ago, Tokay said: Up You can use this solution for example. procedure TMainForm.UniButton1Click(Sender: TObject); begin UniStringGrid1.Cells[1, 1] := '<img src="https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png" height="15px" width="auto"></img>' end; Result: 1 Link to comment Share on other sites More sharing options...
Luis Devis Posted February 27, 2021 Share Posted February 27, 2021 Its very easy , just use a CSS instruction and apply it to Attribs.style in the ondrawcell event. In the event ondrawcell just put this : Attribs.Style.Style := 'border-bottom: 2px solid black' ; Obvously it depends on where do you want to draw the line, how thick do you want the line and what colour. 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