Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Option button deselect
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01229161
Message ID:
01229169
Vues:
15
Ok, I created a grid with two checkboxes. I can have none of the checkboxes checked and that would be fine. I can have one checkbox checked and that would be ok, but I don't want my user to check both boxes as show here:
http://img443.imageshack.us/img443/3081/checkboxra1.jpg
I am building out the grid as follows:
REQUERY('lv_whs_request')
INSERT INTO crs_grid1 (crsinst, crsprod, crswhs, crswho, crsdte, crsrequestamt, crsiid, crspid, crsird, crsaccptamt, crsdelivertype) SELECT * from lv_whs_request

	SELECT crs_grid1

	x = RECCOUNT('crs_grid1')
	IF x > 0
		GO top
	ENDIF 
WITH thisform.pf1.p1.pf2.p21
	.g1.RecordSource="crs_grid1"
	.g1.RecordSourceType = 1
	.g1.ColumnCount=9
	.g1.readonly = .f.				
	.g1.Refresh()
	WITH .g1	
	......
		.column8.controlsource = "crs_grid1.crsitem"		
		IF TYPE('.Column8.Text1.name') = 'C'
			.Column8.RemoveObject('Text1')
		ENDIF 
		IF !TYPE('.Column8.Check1.name') = 'C'
			.Column8.NewObject("Check1", "CheckBox")
		ENDIF 
		.column8.header1.ToolTipText = 'checkmark the box if Sending items from a box to institution'
		.column8.header1.caption = 'Item'
		.Column8.Check1.Visible  = .T.
		.Column8.Check1.Enabled  = .T.
		.Column8.Check1.ReadOnly = .F.
		.Column8.Sparse = .F.
		.column8.Check1.caption = ""
		.column8.Alignment = 2 		
		.column8.width = 50
		.column8.backcolor = RGB(255,255,0)
		.column8.forecolor = RGB(255,0,0)	
		.column8.fontbold = .T.


		.column9.controlsource = "crs_grid1.crsbox"		
		IF TYPE('.Column9.Text1.name') = 'C'
			.Column9.RemoveObject('Text1')
		ENDIF 
		IF !TYPE('.Column9.Check1.name') = 'C'
			.Column9.NewObject("Check1", "CheckBox")
		ENDIF 
		.column9.header1.ToolTipText = 'checkmark if Sending a box of orders to institution'
		.column9.header1.caption = 'Box'
		.Column9.Check1.Visible  = .T.
		.Column9.Check1.Enabled  = .T.
		.Column9.Check1.ReadOnly = .F.
		.Column9.Sparse = .F.
		.column9.Check1.caption = ""
		.column9.Alignment = 2 		
		.column9.width = 50
		.column9.backcolor = RGB(255,255,0)
		.column9.forecolor = RGB(255,0,0)	
		.column9.fontbold = .T.

	ENDWITH 
ENDWITH
My problem is I can't get to the click method for the checkboxes to determine if both checkboxes are checkmarked. In the
#026578
posting, you mentioned something about "bindevent". I couldn't figure it out so I had to abandon it. The only option I had was to do a scan...endscan when a user hit the save button to determine if there was two checkbox checked at the same time. If both were checked then I wouldn't save the record until it was correct. I would like to avoid checking the status of the checkboxes in the save button and just send a message box while the user is checking both boxes at the same time in the grid. I hope I haven't confused you here. Thanks again

nick
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform