rhennink Posted March 13, 2017 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 Quote
mhmda Posted March 13, 2017 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. Quote
Sherzod Posted March 16, 2017 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. Quote
rgreat Posted December 22, 2020 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 ? Quote
Tokay Posted February 14, 2021 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. Quote
Sherzod Posted February 18, 2021 Posted February 18, 2021 8 minutes ago, Tokay said: Up Actually, UniStringGrid is not meant for this. Quote
Sherzod Posted February 18, 2021 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 Quote
Luis Devis Posted February 27, 2021 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. Quote
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.