Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to show a bitmap in a ListBox VFP7.0

ListBox

How to show a bitmap in a ListBox VFP7.0

by  Mike Gagnon  Posted    (Edited  )
This works only in VFP7.0 and higher.
Here is how to show a bitmap in a ListBox using the rarely used PICTURE clause and the Font clause:
Code:
Public oForm1
oForm1=Newobject("form1")
oForm1.AddObject("list1","list1")
oForm1.Show()
Define Class FORM1 As Form
    autocenter = .t.
    caption ="Bitmaps in a list box sample"
    width = 200
    height = 200
    Procedure Init
Define Popup popRelatYes Relative From 1,1
Define Bar 1  Of popRelatYes Prompt 'Open';
    FONT "TOMAHA",12;
    STYLE "BI";
   PICTURE "C:\OPEN.BMP"
Define Bar 2  Of popRelatYes Prompt "New";
FONT "GARAMOND",15;
    STYLE "BU";
    PICTURE "c:\new.bmp"
Endproc
Enddefine
Define Class list1 As ListBox
    RowSource = "popRelatYes"
    RowSourceType = 9
    Visible = .T.
    left = 20
    top =20
Enddefine

Mike Gagnon
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top