Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Codigo no grid
Message
De
23/03/2003 19:11:33
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Codigo no grid
Divers
Thread ID:
00769079
Message ID:
00769079
Vues:
44
**************************************************
*-- Class: pesq_tabela (s:\gestor\libs\objetos.vcx)
*-- ParentClass: form
*-- BaseClass: form
*-- Time Stamp: 03/23/03 07:32:05 PM
*-- Pesquias em tabelas
*

Preciso colocar codigo no controle textbox vinculado a columa do grid, listei o codigo de definicao de classe abaixo pelo class browser de um form que funciona normalmente, mas quando tento executar o prg, da erro na linha:

ADD OBJECT grdcentrocusto.column1.header1 AS header

O que esta errado???

Marcelo Barros.

Set Classlib To objetos
USE gestor!centrocusto
frmteste=CreateObject("pesq_tabela")
frmteste.show


DEFINE CLASS pesq_tabela AS form


Height = 274
Width = 374
DoCreate = .T.
AutoCenter = .T.
Caption = "Pesquisa conta contabil"
WindowType = 1
LockScreen = .F.
Name = "PESQ_CTB"
status = .F.


ADD OBJECT comum1 AS comum WITH ;
Caption = "Descrição", ;
Left = 12, ;
Top = 12, ;
TabIndex = 5, ;
Name = "Comum1"


ADD OBJECT texto1 AS texto WITH ;
Format = "!", ;
Height = 23, ;
Left = 72, ;
TabIndex = 1, ;
Top = 12, ;
Width = 288, ;
Name = "Texto1"


ADD OBJECT grdcentrocusto AS grid WITH ;
ColumnCount = 3, ;
DeleteMark = .F., ;
GridLines = 3, ;
GridLineWidth = 1, ;
HeaderHeight = 20, ;
Height = 200, ;
Left = 12, ;
Panel = 1, ;
ReadOnly = .T., ;
RecordMark = .T., ;
RecordSource = "centrocusto", ;
RecordSourceType = 1, ;
ScrollBars = 2, ;
TabIndex = 2, ;
Top = 38, ;
Width = 348, ;
ForeColor = RGB(0,0,0), ;
BackColor = RGB(255,255,255), ;
GridLineColor = RGB(192,192,192), ;
Name = "grdCentrocusto", ;
Column1.FontBold = .F., ;
Column1.FontName = "Arial", ;
Column1.FontSize = 8, ;
Column1.Alignment = 0, ;
Column1.ControlSource = "centrocusto.descricao", ;
Column1.Width = 208, ;
Column1.ReadOnly = .T., ;
Column1.DynamicBackColor = "", ;
Column1.ForeColor = RGB(0,0,0), ;
Column1.BackColor = RGB(255,255,255), ;
Column1.Name = "Column1", ;
Column2.FontBold = .F., ;
Column2.FontName = "Arial", ;
Column2.FontSize = 8, ;
Column2.Alignment = 0, ;
Column2.ControlSource = "centrocusto.ccusto_id", ;
Column2.Width = 41, ;
Column2.ReadOnly = .T., ;
Column2.DynamicBackColor = "", ;
Column2.ForeColor = RGB(0,0,0), ;
Column2.BackColor = RGB(255,255,255), ;
Column2.Name = "Column2", ;
Column3.FontBold = .F., ;
Column3.FontName = "Arial", ;
Column3.FontSize = 8, ;
Column3.Alignment = 0, ;
Column3.ControlSource = "centrocusto.depto", ;
Column3.Width = 75, ;
Column3.ReadOnly = .T., ;
Column3.DynamicBackColor = "", ;
Column3.ForeColor = RGB(0,0,0), ;
Column3.BackColor = RGB(255,255,255), ;
Column3.Name = "Column3"


ADD OBJECT grdcentrocusto.column1.header1 AS header WITH ;
FontBold = .F., ;
FontName = "Arial", ;
FontSize = 10, ;
Alignment = 2, ;
Caption = "descricao", ;
ForeColor = RGB(0,0,0), ;
BackColor = RGB(192,192,192), ;
Name = "Header1"


ADD OBJECT pesq_tabela.grdcentrocusto.column1.text1 AS textbox WITH ;
FontBold = .F., ;
FontName = "Arial", ;
FontSize = 8, ;
Alignment = 0, ;
BorderStyle = 0, ;
Margin = 0, ;
ReadOnly = .T., ;
ForeColor = RGB(0,0,0), ;
BackColor = RGB(255,255,255), ;
Name = "Text1"


ADD OBJECT pesq_tabela.grdcentrocusto.column2.header1 AS header WITH ;
FontBold = .F., ;
FontName = "Arial", ;
FontSize = 10, ;
Alignment = 2, ;
Caption = "Conta", ;
ForeColor = RGB(0,0,0), ;
BackColor = RGB(192,192,192), ;
Name = "Header1"


ADD OBJECT pesq_tabela.grdcentrocusto.column2.text1 AS textbox WITH ;
FontBold = .F., ;
FontName = "Arial", ;
FontSize = 8, ;
Alignment = 0, ;
BorderStyle = 0, ;
Margin = 0, ;
ReadOnly = .T., ;
ForeColor = RGB(0,0,0), ;
BackColor = RGB(255,255,255), ;
Name = "Text1"


ADD OBJECT pesq_tabela.grdcentrocusto.column3.header1 AS header WITH ;
FontBold = .F., ;
FontName = "Arial", ;
FontSize = 10, ;
Alignment = 2, ;
Caption = "depto", ;
ForeColor = RGB(0,0,0), ;
BackColor = RGB(192,192,192), ;
Name = "Header1"


ADD OBJECT pesq_tabela.grdcentrocusto.column3.text1 AS textbox WITH ;
FontBold = .F., ;
FontName = "Arial", ;
FontSize = 8, ;
Alignment = 0, ;
BorderStyle = 0, ;
Margin = 0, ;
ReadOnly = .T., ;
ForeColor = RGB(0,0,0), ;
BackColor = RGB(255,255,255), ;
Name = "Text1"


ADD OBJECT botao1 AS botao WITH ;
Top = 240, ;
Left = 300, ;
Caption = "OK", ;
TabIndex = 3, ;
Name = "Botao1"


ADD OBJECT botao2 AS botao WITH ;
Top = 240, ;
Left = 240, ;
Caption = "Cancelar", ;
TabIndex = 4, ;
Name = "Botao2"


PROCEDURE Init
thisform.status=.f.
ENDPROC


PROCEDURE Unload
return (this.status)
ENDPROC


PROCEDURE texto1.InteractiveChange
=Seek(Alltrim(this.Value),"centrocusto","descricao")
thisform.grdCentrocusto.refresh
ENDPROC


PROCEDURE text1.DblClick
thisform.Botao1.Click
ENDPROC


PROCEDURE text1.KeyPress
LPARAMETERS nKeyCode, nShiftAltCtrl
If nKeyCode=13
thisform.Botao1.Click
endif
ENDPROC


PROCEDURE botao1.Click
thisform.status=.t.
thisform.release
ENDPROC


PROCEDURE botao2.Click
thisform.release
ENDPROC


ENDDEFINE
*
*-- EndDefine: pesq_tabela
**************************************************
Répondre
Fil
Voir

Click here to load this message in the networking platform