Rav Posted April 30, 2017 Posted April 30, 2017 Hello, Demo application shows UniDBGrid with columns that contain either text or image. Is it possible to show image and text in one cell? Quote
Sherzod Posted April 30, 2017 Posted April 30, 2017 Hi, Which edition and build are you using?! Best regards, Quote
TobiS Posted August 1, 2018 Posted August 1, 2018 i have kind of the same question. I need text and Image in one UniDBGrid cell. As well if possible a way to custom draw the cell including cell borders. In the demo i can change background color and Font color. I am using 1.0.0.1407 right now. Best Regards Quote
Sherzod Posted August 1, 2018 Posted August 1, 2018 Hi, I am using 1.0.0.1407 right now. I think it's time to upgrade to ExtJS 6... Quote
TobiS Posted August 1, 2018 Posted August 1, 2018 ya i install the new one and take a look. time just flies by .. Quote
TobiS Posted August 1, 2018 Posted August 1, 2018 i installed the newest version (1.10.0.1472) now but the question remains. Quote
Sherzod Posted August 1, 2018 Posted August 1, 2018 What images you will be using, or do you want to show icons + text ? Quote
Sherzod Posted August 3, 2018 Posted August 3, 2018 Hi, Also you can use FontAwesome icons + text Quote
Mindaugas Posted August 22, 2019 Posted August 22, 2019 Hi, I am doing some research on different products (uniGui, IntraWeb, ...) to migrate my desktop application into a web application. In my desktop application, I use ListViews a lot (mainly because I need to show an image + text side by side in the grid) and really missed it in uniGUI. So my question: how to show image (png, ico, bmp - doesn't matter) + text in one TUniDBGrid cell? Quote
Hayri ASLAN Posted August 23, 2019 Posted August 23, 2019 Hi, You can use html tags inside cell. Like <img src="smiley.gif" width="16" height="16"> Smiley Quote
Mindaugas Posted August 24, 2019 Posted August 24, 2019 Thanks. Finally, I solved this puzzle, here is the solution: procedure TUniForm.CountryGetText(Sender: TField; var Text: string; DisplayText: Boolean); begin Text := '<img height="16", width="16", src="images\' + DataModule.FDQuery.FieldByName('Country').AsString + '.png" /> ' + DataModule.FDQuery.FieldByName('Country').AsString; end; procedure TUniForm.UniDBGridDrawColumnCell(Sender: TObject; ACol, ARow: Integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs); begin if Column.FieldName = 'Country' then Column.Field.OnGetText := CountryGetText; end; Quote
Abaksoft Posted December 29, 2019 Posted December 29, 2019 1. See also : Thx to Eduardo Belo. 2. And for using Fontawsome, see : 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.