Problem with glyph in button list

From: Marcel van den Arend (marcel_at__NSPM_firstdata.nl)
Date: 11/27/03


Date: Thu, 27 Nov 2003 16:04:52 +0100

Hello, I am having a problem with adding Glyphs to BitButtons that I have in
a TList.

I have a number of Buttons on the screen that are userdefinable, all
information is stored in a ClientDataSet.

Everything works perfectly, captions, tags etc. except for the glyph, my
code looks like this:

procedure TFormMain.UpdateWindow;
var
  I : integer;
begin
  For I := 0 to ButtonCount - 1 do
  begin
    // Get record BlahBlah (taken out )
    btn := (BitBtnlist.Items[I]);

    btn.Caption := FieldByName('AliasDesc').AsString;
    btn.Tag := FieldByName('TagNumber').AsInteger;
    try
      btn.glyph.LoadFromFile(FieldByName('Icon').AsString); // <-
Undeclared identifier 'Glyph
    except
      // ignore if not able to load
    end;
  end;
end; // procedure TFormMain.UpdateWindow;

Typing Bitbtn1.glyph.LoadFromFile(FieldByName('Icon').AsString); works fine.


Quantcast