Article ID: 134855
Article Last Modified on 2/15/2000
CREATE TABLE table1 ;
(col1 C(15), col2 c(15))
append blank
replace col1 with 'Row(1) Col(1)'
replace col2 with 'Row(1) Col(2)'
append blank
replace col1 with 'Row(2) Col(1)'
replace col2 with 'Row(2) Col(2)'
append blank
replace col1 with 'Row(3) Col(1)'
replace col2 with 'Row(3) Col(2)'
append blank
replace col1 with 'Row(4) Col(1)'
replace col2 with 'Row(4) Col(2)'
append blank
replace col1 with 'Row(5) Col(1)'
replace col2 with 'Row(5) Col(2)'
skip - 5
use table1
public x
x = create("f1")
x.show
define class f1 as form
add object grid1 as grid with ;
forecolor = rgb(255,0,0);
add object b1 as commandbutton with ;
fontsize = 8, ;
caption = 'AddColumn', ;
top = 200
add object l1 as label with ;
caption = 'Clicking this button should add a Column.', ;
fontsize = 8, ;
autosize = .T., ;
top = 220
proc b1.click
x.grid1.addcolumn
x.grid1.column3.addobject('text','textbox')
x.grid1.column3.currentcontrol = 'text1'
x.grid1.column3.text1.visible = .t.
x.refresh
endproc
enddefine
* Click the AddColumn button.
* Click in one of the blank cells and begin typing.
Additional query words: 3.00 VFoxWin
Keywords: KB134855