Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BMP graphic in General field not showing in listbox?
Message
 
À
06/03/2002 06:38:37
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00628878
Message ID:
00628927
Vues:
13
Cetin,

I make a cursor called hospstatus that is the RowSource for my listbox. This is the code I use to build the cursor and fill the listbox. I would like to use most of what I have here, but I am not sure how to make the cursor use the external bmps. myList.Picture(Index)=BMPFileName as you suggested in 1). I think I am close, but when I run this I never see the graphic in column 1.
PUBLIC PhoneBMP NoPhoneBMP
PhoneBMP = "c:\divert\redphone.bmp"
NoPhoneBMP = "c:\divert\nophone.bmp"

IF EOF()
   GO TOP
ENDIF

CREATE CURSOR hospstatus (redphone G(4), phonecall C(9), typecall C(20), hname C(30), ;
	newstatus C(20), olddate D(8), elapstime C(5))

rec_cnt=0
SELECT hospstatus
SET SAFETY OFF
ZAP
SET SAFETY ON

SELECT hospital
SCAN
	SELECT hospstatus
	APPEND BLANK
 	IF ALLT(hospital.phonepic) = "Y"
 		THISFORM.Slist.Picture(1,rec_cnt+1) = m.PhoneBMP
* 		APPEND GENERAL hospstatus.redphone FROM (PhoneBMP)
 	ELSE
 		THISFORM.Slist.Picture(1,rec_cnt+1) = m.NoPhoneBMP		
* 		APPEND GENERAL hospstatus.redphone FROM (NoPhoneBMP)
 	ENDIF
	REPLACE hospstatus.phonecall WITH hospital.phonecall
	REPLACE hospstatus.typecall WITH hospital.typecall
	REPLACE hospstatus.hname WITH hospital.hname
	REPLACE hospstatus.newstatus WITH hospital.newstatus
	REPLACE hospstatus.olddate WITH hospital.olddate
	REPLACE hospstatus.elapstime WITH hospital.elapstime
    rec_cnt=rec_cnt+1
	SELECT hospital
ENDSCAN
IF rec_cnt=0
	SELECT hospstatus
	APPEND BLANK
	WAIT "NO RECORDS FOUND!!!" WINDOW
ENDIF
SELECT hospital
GO TOP
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site: www.stephenkramer.com
Would you believe Far Side Lite?
More than 270 original cartoons.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform