Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I need help me with ComboBoxes
Message
From
06/08/1999 12:38:16
 
 
To
06/08/1999 08:53:26
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00250291
Message ID:
00250742
Views:
12
Hi, Denis.
Sorry about that. I didn't notice I'd used a Less-Than sign in my button caption in the code. Since that's the marker for HTML tags, it hosed the rest of the code.

I'm not sure that it will run with 3.0. I don't have 3.0 installed anymore, I'm sorry to say. In anycase, the code itself will tell you the properties to set. Check esp. the class defination code for the cbo. Also, feel free to ask any questions you like about the code. HTH

Here it is again w/o the same problem. (I hope < s>.)
oX = CREATEOBJECT( 'form1' )
oX.show()
READ EVENTS
CANCEL ALL
CLEAR ALL

**************************************************
*-- Form:         form1 (c:\nec\temp.scx)
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   08/05/99 12:40:02 PM
*

DEFINE CLASS form1 AS form


	DataSession = 2
	Top = 0
	Left = 0
	Height = 95
	Width = 214
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT combo1 AS combobox WITH ;
		BoundColumn = 2, ;
		ColumnCount = 2, ;
		RowSourceType = 3, ;
		RowSource = 'SELECT CNAME + ":" + CDESC AS CDESC, CNAME FROM oLookup INTO CURSOR vwLookUp ORDER BY 1', ;
		ControlSource = "oTable.cname", ;
		Height = 24, ;
		Left = 15, ;
		Top = 19, ;
		Width = 85, ;
		Name = "Combo1"


	ADD OBJECT command1 AS commandbutton WITH ;
		Top = 48, ;
		Left = 15, ;
		Height = 27, ;
		Width = 84, ;
		Caption = "Go Back", ;
		Name = "Command1"


	ADD OBJECT command2 AS commandbutton WITH ;
		Top = 48, ;
		Left = 103, ;
		Height = 27, ;
		Width = 84, ;
		Caption = ">>Go Forward", ;
		Name = "Command2"


	ADD OBJECT text1 AS textbox WITH ;
		ControlSource = "oTable.dadded", ;
		Height = 23, ;
		Left = 103, ;
		Top = 20, ;
		Width = 84, ;
		Name = "Text1"

	PROCEDURE UnLoad
		CLEAR EVENTS
	ENDPROC

	PROCEDURE Load

		CREATE CURSOR oLookup ( CNAME C (3), CDESC C (100) )
		INSERT INTO oLookup ( CNAME, CDESC ) VALUES ( 'N1', 'Really Long Description1' ) 
		INSERT INTO oLookup ( CNAME, CDESC ) VALUES ( 'N2', 'Really Long Description2' ) 
		INSERT INTO oLookup ( CNAME, CDESC ) VALUES ( 'N3', 'Really Long Description3' ) 
		INSERT INTO oLookup ( CNAME, CDESC ) VALUES ( 'N4', 'Really Long Description4' ) 
		INSERT INTO oLookup ( CNAME, CDESC ) VALUES ( 'N5', 'Really Long Description5' ) 
		INSERT INTO oLookup ( CNAME, CDESC ) VALUES ( 'N6', 'Really Long Description6' ) 
		INSERT INTO oLookup ( CNAME, CDESC ) VALUES ( 'N7', 'Really Long Description7' ) 
		INSERT INTO oLookup ( CNAME, CDESC ) VALUES ( 'N8', 'Really Long Description8' ) 
		INSERT INTO oLookup ( CNAME, CDESC ) VALUES ( 'N9', 'Really Long Description9' ) 
		INSERT INTO oLookup ( CNAME, CDESC ) VALUES ( 'N10', 'Really Long Description10' ) 
		GO TOP IN oLookup
		
		CREATE CURSOR oTable ( CNAME C (10), DADDED D )
		INSERT INTO oTable ( CNAME, DADDED ) VALUES ( '', DATE() + RECCOUNT( 'oTable' ) )
		INSERT INTO oTable ( CNAME, DADDED ) VALUES ( '', DATE() + RECCOUNT( 'oTable' ) )
		INSERT INTO oTable ( CNAME, DADDED ) VALUES ( '', DATE() + RECCOUNT( 'oTable' ) )
		INSERT INTO oTable ( CNAME, DADDED ) VALUES ( '', DATE() + RECCOUNT( 'oTable' ) )
		INSERT INTO oTable ( CNAME, DADDED ) VALUES ( '', DATE() + RECCOUNT( 'oTable' ) )
		INSERT INTO oTable ( CNAME, DADDED ) VALUES ( '', DATE() + RECCOUNT( 'oTable' ) )
		INSERT INTO oTable ( CNAME, DADDED ) VALUES ( '', DATE() + RECCOUNT( 'oTable' ) )
		INSERT INTO oTable ( CNAME, DADDED ) VALUES ( '', DATE() + RECCOUNT( 'oTable' ) )
		GO TOP IN oTable

	ENDPROC	
	PROCEDURE command1.Click
		SKIP -1 IN oTable
		IF BOF( 'oTable' )
			LOCATE
		ENDIF
		thisform.refresh
	ENDPROC


	PROCEDURE command2.Click
		SKIP 1 IN oTable
		IF EOF( 'oTable' )
			GO BOTTOM
		ENDIF
		thisform.refresh
	ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
>Hi Nancy,
>
>Before we go further are you sure that your piece of code will work with VFP 3.0?
>
>I looked at the message #250349 but for some odd reason I can't see all of the code. This piece of code is truncated at the "less than sign".
>
>Could that special character be the reason for the truncation.
>
>When I do a reply I don't see the code so I can't cut and paste.
>
>Can you help me with all this?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform