Rav Posted April 30, 2017 Share 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 Link to comment Share on other sites More sharing options...
Sherzod Posted April 30, 2017 Share Posted April 30, 2017 Hi, Which edition and build are you using?! Best regards, Quote Link to comment Share on other sites More sharing options...
Rav Posted April 30, 2017 Author Share Posted April 30, 2017 The latest trial Quote Link to comment Share on other sites More sharing options...
TobiS Posted August 1, 2018 Share 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 Link to comment Share on other sites More sharing options...
Sherzod Posted August 1, 2018 Share 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 Link to comment Share on other sites More sharing options...
TobiS Posted August 1, 2018 Share Posted August 1, 2018 ya i install the new one and take a look. time just flies by .. Quote Link to comment Share on other sites More sharing options...
TobiS Posted August 1, 2018 Share Posted August 1, 2018 i installed the newest version (1.10.0.1472) now but the question remains. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 1, 2018 Share Posted August 1, 2018 What images you will be using, or do you want to show icons + text ? Quote Link to comment Share on other sites More sharing options...
TobiS Posted August 3, 2018 Share Posted August 3, 2018 i would like to show Icons + Text Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 3, 2018 Share Posted August 3, 2018 Hi, Also you can use FontAwesome icons + text Quote Link to comment Share on other sites More sharing options...
Mindaugas Posted August 22, 2019 Share 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 Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted August 23, 2019 Share Posted August 23, 2019 Hi, You can use html tags inside cell. Like <img src="smiley.gif" width="16" height="16"> Smiley Quote Link to comment Share on other sites More sharing options...
Mindaugas Posted August 24, 2019 Share 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 Link to comment Share on other sites More sharing options...
Abaksoft Posted December 29, 2019 Share Posted December 29, 2019 1. See also : Thx to Eduardo Belo. 2. And for using Fontawsome, see : 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.