Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filling a grid
Message
From
18/06/2006 04:25:51
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Filling a grid
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows 2000 Server
Miscellaneous
Thread ID:
01129787
Message ID:
01129787
Views:
56
Hi all
I have a grid that the user has to fill it by command button.
Here is the code:
PUBLIC form1
  form1= CREATEOBJECT('Form1')
   form1.Visible = .T.
form1.show 
DEFINE CLASS form1 AS form


	Top = 164
	Left = 78
	Height = 267
	Width = 823
	DoCreate = .T.
	Caption = "Filling"
	Name = "Form1"


	ADD OBJECT grid1 AS grid WITH ;
		Height = 181, ;
		Left = 36, ;
		ReadOnly = .T., ;
		Top = 72, ;
		Width = 732, ;
		Name = "Grid1"


	ADD OBJECT label1 AS label WITH ;
		AutoSize = .T., ;
		Caption = "From Line", ;
		Height = 17, ;
		Left = 60, ;
		Top = 11, ;
		Width = 58, ;
		Name = "Label1"


	ADD OBJECT combo1 AS combobox WITH ;
		Height = 24, ;
		Left = 120, ;
		Top = 7, ;
		Width = 48, ;
		Name = "Combo1"


	ADD OBJECT label2 AS label WITH ;
		AutoSize = .T., ;
		Caption = "Column #", ;
		Height = 17, ;
		Left = 174, ;
		Top = 11, ;
		Width = 56, ;
		Name = "Label2"


	ADD OBJECT spinner1 AS spinner WITH ;
		Height = 25, ;
		KeyboardHighValue = 12, ;
		KeyboardLowValue = 1, ;
		Left = 240, ;
		SpinnerHighValue =  12.00, ;
		SpinnerLowValue =   1.00, ;
		Top = 7, ;
		Width = 36, ;
		Value = 1, ;
		Name = "Spinner1"


	ADD OBJECT label3 AS label WITH ;
		AutoSize = .T., ;
		Caption = "To Line", ;
		Height = 17, ;
		Left = 60, ;
		Top = 42, ;
		Width = 43, ;
		Name = "Label3"


	ADD OBJECT combo2 AS combobox WITH ;
		Height = 24, ;
		Left = 120, ;
		Top = 38, ;
		Width = 48, ;
		Name = "Combo2"


	ADD OBJECT label4 AS label WITH ;
		AutoSize = .T., ;
		Caption = "Column #", ;
		Height = 17, ;
		Left = 174, ;
		Top = 42, ;
		Width = 56, ;
		Name = "Label4"


	ADD OBJECT spinner2 AS spinner WITH ;
		Height = 25, ;
		KeyboardHighValue = 12, ;
		KeyboardLowValue = 1, ;
		Left = 240, ;
		SpinnerHighValue =  12.00, ;
		SpinnerLowValue =   1.00, ;
		Top = 38, ;
		Width = 36, ;
		Value = 1, ;
		Name = "Spinner2"


	ADD OBJECT command1 AS commandbutton WITH ;
		AutoSize = .T., ;
		Top = 37, ;
		Left = 285, ;
		Height = 27, ;
		Width = 35, ;
		FontBold = .T., ;
		Caption = "Fill", ;
		Name = "Command1"


	PROCEDURE Activate
		select crsrlines 
	ENDPROC


	PROCEDURE Load
		create cursor crsrlines (titlehead c(1),head1 c(1),;
		head2 c(1),head3 c(1),head4 c(1),head5 c(1),head6 c(1),head7 c(1),head8 c(1),;
		head9 c(1),head10 c(1),head11 c(1),head12 c(1))
		insert into crsrlines (titlehead) values ('A')
		insert into crsrlines (titlehead) values ('B')
		insert into crsrlines (titlehead) values ('C')
		insert into crsrlines (titlehead) values ('D')
		insert into crsrlines (titlehead) values ('E')
		insert into crsrlines (titlehead) values ('F')
		insert into crsrlines (titlehead) values ('G')
		insert into crsrlines (titlehead) values ('H')

		go top in crsrlines 
	ENDPROC


	PROCEDURE combo1.Init
		this.AddItem('A')
		this.AddItem('B')
		this.AddItem('C')
		this.AddItem('D')
		this.AddItem('E')
		this.AddItem('F')
		this.AddItem('G')
		this.Value='A'
	ENDPROC


	PROCEDURE combo2.Init
		this.AddItem('A')
		this.AddItem('B')
		this.AddItem('C')
		this.AddItem('D')
		this.AddItem('E')
		this.AddItem('F')
		this.AddItem('G')
		this.Value='A'
	ENDPROC


ENDDEFINE
I Want the following options:
1. If the user select range in the top the color of the range will be yellow, if he filled it, it's will be blue, otherwise whaite (the user will get an indication what he did and what he planning and going to fill).
Thank you
Thank you
Chaim
Next
Reply
Map
View

Click here to load this message in the networking platform