Jump to content

Image and UniDBGrid


Volk65
 Share

Recommended Posts

I want to show image in UniDBGrid. The picture is stored in UniImageList. I watched the examples. I tried to do so:

procedure Tfr_ADM_UserList.dbgPrivsFieldImage(const Column: TUniDBGridColumn;
  const AField: TField; var OutImage: TGraphic; var DoNotDispose: Boolean; var ATransparent: TUniTransparentOption);

var BMP: TBitmap;
begin
  if Column.FieldName='USED' then begin
    BMP:=TBitmap.Create;
    try
      UniImageList1.GetBitmap(4, BMP);
      OutImage:=BMP;
    finally
    end;
  end;

Does not work. Nothing is displayed.

 

(sorry for my Yandex-translate :)

Link to comment
Share on other sites

Did you set the ImageOptions - Visible of Column field 'USED' to True ?

Of course.

I understand what the problem is. After I have set the

Grid.Columns[x].CheckBoxField.Enabled:=False;

the picture appeared. Default property =True

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...