Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filling a grid
Message
From
20/06/2006 04:29:56
 
 
To
19/06/2006 12:35:18
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows 2000 Server
Miscellaneous
Thread ID:
01129787
Message ID:
01130165
Views:
16
OK
Now I didn't get any error message.
The code is very good, but I have one problem: If I filled cells by blue and I try to fill new cells, the previous become white - The user has to see what he filled.
Thank's
>You don't give clue what the error is. Anyway I guess it's Pretext (my ignorance didn't check you were using VFP8).
>
>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
>
>  Procedure combo1.InteractiveChange
>    Thisform.GridColor(0x00FFFF)
>  Endproc
>  Procedure combo2.InteractiveChange
>    Thisform.GridColor(0x00FFFF)
>  Endproc
>  Procedure spinner1.InteractiveChange
>    Thisform.GridColor(0x00FFFF)
>  Endproc
>  Procedure spinner2.InteractiveChange
>    Thisform.GridColor(0x00FFFF)
>  Endproc
>  Procedure command1.Click
>    Thisform.GridColor(0xFF0000)
>  Endproc
>
>  Procedure GridColor
>    Lparameters tnColor
>    With This.grid1
>      .SetAll("DynamicBackColor","")
>      Local dynBackColor
>      TEXT TO dynBackColor TEXTMERGE NOSHOW
>IIF(BETWEEN(crsrlines.titlehead,
>"<<MIN(this.combo1.value,this.combo2.value)>>",
>"<<MAX(this.combo1.value,this.combo2.value)>>"),
><<m.tnColor>>,0xFFFFFF)
>      ENDTEXT
>      dynBackColor = chrtran(m.dynBackColor,CHR(13)+CHR(10),'')
>      For ix=Min(This.spinner1.Value,This.spinner2.Value) To ;
>          Max(This.spinner1.Value,This.spinner2.Value)
>        .Columns(m.ix).DynamicBackColor = m.dynBackColor
>        .Refresh
>      Endfor
>    Endwith
>  Endproc
>
>ENDDEFINE
>
Cetin
Thank you
Chaim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform