INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

ListBox

How to show a bitmap in a ListBox VFP7.0 by mgagnon
Posted: 26 Oct 02 (Edited 27 Oct 02)

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:

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

Back to Microsoft: Visual FoxPro FAQ Index
Back to Microsoft: Visual FoxPro Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close