Estou tentando fazer uma aplica��o, onde existe uma ChildTable, e esta tem colunas Check Box para serem marcadas ou desmarcadas via click.
Em alguns casos na carga dessa table, vou precisar efetuar um Disable na c�lula/checkbox pois j� estar� marcado, neste caso o usu�rio n�o dever� alterar o valor da c�lula.
Depois qdo for efetuar a leitura dessa table, vou precisar verificar se a c�lula/checkbox estar� marcado e Enable, para processar.
Segue em anexo uma das minhas tentativas.
Se algu�m j� fez isto e puder ajudar.
Agrade�o, Haroldo.
Application Description: Centura SQLWindows Standard Application Template
Outline Version - 4.0.28
Design-time Settings
.data VIEWINFO
0000: 6F00000001000000 FFFF01000D004347 5458566965775374 6174650400800000
0020: 0000000000700000 002C000000020000 0003000000FFFFFF FFFFFFFFFFFCFFFF
0040: FFE9FFFFFFFFFFFF FF000000007C0200 004D010000010000 0000000000010000
0060: 000F4170706C6963 6174696F6E497465 6D02000000075769 6E646F7773046672
0080: 6D31
.enddata
Outline Window State: Normal
Outline Window Location and Size
.data VIEWINFO
0000: 6600040003002D00 0000000000000000 0000B71E5D0E0500 1D00FFFF4D61696E
0020: 0000000000000000 0000000000000000 0000003B00010000 00000000000000E9
0040: 1E800A00008600FF FF496E7465726E61 6C2046756E637469 6F6E730000000000
0060: 0000000000000000 0000000000003200 0100000000000000 0000E91E800A0000
0080: DF00FFFF56617269 61626C6573000000 0000000000000000 0000000000000000
00A0: 3000010000000000 00000000F51E100D 0000F400FFFF436C 6173736573000000
00C0: 0000000000000000 0000000000000000
.enddata
.data VIEWSIZE
0000: D000
.enddata
Left: -0.013"
Top: 0.0"
Width: 8.013"
Height: 4.969"
Options Box Location
.data VIEWINFO
0000: D4180909B80B1A00
.enddata
.data VIEWSIZE
0000: 0800
.enddata
Visible? Yes
Left: 4.15"
Top: 1.885"
Width: 3.8"
Height: 2.073"
Class Editor Location
Visible? No
Left: 0.575"
Top: 0.094"
Width: 5.063"
Height: 2.719"
Tool Palette Location
Visible? No
Left: 6.388"
Top: 0.729"
Fully Qualified External References? Yes
Reject Multiple Window Instances? No
Enable Runtime Checks Of External References? Yes
Use Release 4.0 Scope Rules? No
Libraries
File Include: vt.apl
! File Include: ..\sam_2000\classbase.apl
Global Declarations
Window Defaults
Tool Bar
Display Style? Etched
Font Name: MS Sans Serif
Font Size: 8
Font Enhancement: System Default
Text Color: System Default
Background Color: System Default
Form Window
Display Style? Etched
Font Name: MS Sans Serif
Font Size: 8
Font Enhancement: System Default
Text Color: System Default
Background Color: System Default
Dialog Box
Display Style? Etched
Font Name: MS Sans Serif
Font Size: 8
Font Enhancement: System Default
Text Color: System Default
Background Color: System Default
Top Level Table Window
Font Name: MS Sans Serif
Font Size: 8
Font Enhancement: System Default
Text Color: System Default
Background Color: System Default
Data Field
Font Name: Use Parent
Font Size: Use Parent
Font Enhancement: Use Parent
Text Color: Use Parent
Background Color: Use Parent
Multiline Field
Font Name: Use Parent
Font Size: Use Parent
Font Enhancement: Use Parent
Text Color: Use Parent
Background Color: Use Parent
Spin Field
Font Name: Use Parent
Font Size: Use Parent
Font Enhancement: Use Parent
Text Color: Use Parent
Background Color: Use Parent
Background Text
Font Name: Use Parent
Font Size: Use Parent
Font Enhancement: Use Parent
Text Color: Use Parent
Background Color: Use Parent
Pushbutton
Font Name: Use Parent
Font Size: Use Parent
Font Enhancement: Use Parent
Radio Button
Font Name: Use Parent
Font Size: Use Parent
Font Enhancement: Use Parent
Text Color: Use Parent
Background Color: Use Parent
Check Box
Font Name: Use Parent
Font Size: Use Parent
Font Enhancement: Use Parent
Text Color: Use Parent
Background Color: Use Parent
Option Button
Font Name: Use Parent
Font Size: Use Parent
Font Enhancement: Use Parent
Group Box
Font Name: Use Parent
Font Size: Use Parent
Font Enhancement: Use Parent
Text Color: Use Parent
Background Color: Use Parent
Child Table Window
Font Name: Use Parent
Font Size: Use Parent
Font Enhancement: Use Parent
Text Color: Use Parent
Background Color: Use Parent
List Box
Font Name: Use Parent
Font Size: Use Parent
Font Enhancement: Use Parent
Text Color: Use Parent
Background Color: Use Parent
Combo Box
Font Name: Use Parent
Font Size: Use Parent
Font Enhancement: Use Parent
Text Color: Use Parent
Background Color: Use Parent
Line
Line Color: Use Parent
Frame
Border Color: Use Parent
Background Color: 3D Face Color
Picture
Border Color: Use Parent
Background Color: Use Parent
Formats
Number: 0'%'
Number: #0
Number: ###000
Number: ###000;'($'###000')'
Date/Time: hh:mm:ss AMPM
Date/Time: M/d/yy
Date/Time: MM-dd-yy
Date/Time: dd-MMM-yyyy
Date/Time: MMM d, yyyy
Date/Time: MMM d, yyyy hh:mm AMPM
Date/Time: MMMM d, yyyy hh:mm AMPM
External Functions
Constants
.data CCDATA
0000: 3000000000000000 0000000000000000 00000000
.enddata
.data CCSIZE
0000: 1400
.enddata
System
User
Number: COL_ReadOnly = 0x0200
Enumerations
Resources
Variables
Internal Functions
Named Menus
Class Definitions
.data RESOURCE 0 0 1 3760730002
0000: 41040000E1010000 0000000000000000 0200000500FFFF01 00160000436C6173
0020: 73566172004F7574 6C696E6552006567 496E666F13013800 00000F6300446573
0040: 6B746F704C006973 74426F784E01C200 0B00000043190000 0001FA0000FF6F19
0060: 00D6190001FE00FF 833200000019B500 0100FFFF604B0000 001900ED0100FF3F
0080: 6400580000190001 FB00FF0F7D000000 D6190001FE00FF83 9600000019B50001
00A0: 00FFFF60AF000000 1900ED0100FF3FC8 00580000190001FB 00FF0FE1000000D6
00C0: 190001FE00FF83FA 00000019B5000100 FFFF100180640000 010001000B634469
00E0: 724C3E697C00C000 00040000005B1900 01FB00FF6F1900D6 190001FE00FF9B32
0100: 0019B5000100FFFF 664B001900ED0100 FF3F0180044B0000 020000001E0F5472
0120: 65F8654C69005E00 0000030000006F19 00E9010000FFBF19 5900190001FB00FF
0140: 6F3200D6190001FE 00FF430180AF0000 0603000C634669F8 6C654C01D6000000
0160: 070000DE0019D200 010000FF7F19B300 1900F60100FFDF32 AC00190001FD00FF
0180: 374B00196B000100 FFFFCD640019DA00 0100FF7F7DB30019 00F60100FFDF96AC
01A0: 00190001FD00FF87 01807D000C000400 0D6352C06164696F 4C69079A00000005
01C0: 790000194B000100 00FFFFCD190019DA 000100FF7F32B300 1900F60100FFDF4B
01E0: AC00190001FD00FF 376400196B000100 FFFF01
.enddata
Default Classes
MDI Window: cBaseMDI
Form Window:
Dialog Box:
Table Window:
Quest Window:
Data Field:
Spin Field:
Multiline Field:
Pushbutton:
Radio Button:
Option Button:
Check Box:
Child Table:
Quest Child Window: cQuickDatabase
List Box:
Combo Box:
Picture:
Vertical Scroll Bar:
Horizontal Scroll Bar:
Column:
Background Text:
Group Box:
Line:
Frame:
Custom Control:
ActiveX:
Application Actions
Form Window: frm1
Class:
Property Template:
Class DLL Name:
Title:
Icon File:
Accessories Enabled? No
Visible? Yes
Display Settings
Display Style? Default
Visible at Design time? Yes
Automatically Created at Runtime? Yes
Initial State: Normal
Maximizable? Yes
Minimizable? Yes
System Menu? Yes
Resizable? Yes
Window Location and Size
Left: Default
Top: Default
Width: 9.367"
Width Editable? Yes
Height: 4.417"
Height Editable? Yes
Form Size
Width: Default
Height: Default
Number of Pages: Dynamic
Font Name: Default
Font Size: Default
Font Enhancement: Default
Text Color: Default
Background Color: Default
Description:
Named Menus
Menu
Tool Bar
Display Settings
Display Style? Default
Location? Top
Visible? Yes
Size: Default
Size Editable? Yes
Font Name: Default
Font Size: Default
Font Enhancement: Default
Text Color: Default
Background Color: Default
Contents
Contents
Child Table: tbl1
Class Child Ref Key: 0
Class ChildKey: 0
Class:
Property Template:
Class DLL Name:
Display Settings
Window Location and Size
Left: 0.583"
Top: 0.667"
Width: 5.35"
Width Editable? Yes
Height: 3.071"
Height Editable? Yes
Visible? Yes
Font Name: Default
Font Size: Default
Font Enhancement: Default
Text Color: Default
Background Color: Default
View: Table
Allow Row Sizing? No
Lines Per Row: Default
Memory Settings
Maximum Rows in Memory: Default
Discardable? Yes
Contents
Column: colTexto
Class Child Ref Key: 0
Class ChildKey: 0
Class:
Property Template:
Class DLL Name:
Title:
Visible? Yes
Editable? No
Maximum Data Length: Default
Data Type: String
Justify: Left
Width: Default
Width Editable? Yes
Format: Unformatted
Country: Default
Input Mask: Unformatted
Cell Options
Cell Type? Standard
Multiline Cell? No
Cell DropDownList
Sorted? Yes
Vertical
Scroll? Yes
Auto Drop Down?
No
Allow Text
Editing? Yes
Cell CheckBox
Check Value: 1
Uncheck Value: 0
Ignore Case? Yes
List Values
Message Actions
Column: col1
Class Child Ref Key: 0
Class ChildKey: 0
Class:
Property Template:
Class DLL Name:
Title:
Visible? Yes
Editable? Yes
Maximum Data Length: Default
Data Type: Number
Justify: Left
Width: Default
Width Editable? Yes
Format: Unformatted
Country: Default
Input Mask: Unformatted
Cell Options
Cell Type? Check Box
Multiline Cell? No
Cell DropDownList
Sorted? Yes
Vertical
Scroll? Yes
Auto Drop Down?
No
Allow Text
Editing? Yes
Cell CheckBox
Check Value: 1
Uncheck Value: 0
Ignore Case? Yes
List Values
Message Actions
On SAM_User
Call
SalTblSetContext( tbl1, dfLinha )
Call
SalTblSetFocusRow( tbl1, dfLinha )
Call
SalTblSetFocusCell ( hWndForm, lParam, hWndItem, 0, 1 )
! Call
SalDisableWindow( hWndItem )
! Call
VisWinSetFlags( hWndItem, WF_DisplayOnly, TRUE )
! Call
SalTblSetColumnFlags( hWndItem, COL_ReadOnly, FALSE )
Call
VisWinSetStyle( hWndItem, 0x0020, FALSE )
Column: col2
Class Child Ref Key: 0
Class ChildKey: 0
Class:
Property Template:
Class DLL Name:
Title:
Visible? Yes
Editable? Yes
Maximum Data Length: Default
Data Type: Number
Justify: Left
Width: Default
Width Editable? Yes
Format: Unformatted
Country: Default
Input Mask: Unformatted
Cell Options
Cell Type? Check Box
Multiline Cell? No
Cell DropDownList
Sorted? Yes
Vertical
Scroll? Yes
Auto Drop Down?
No
Allow Text
Editing? Yes
Cell CheckBox
Check Value: 1
Uncheck Value: 0
Ignore Case? Yes
List Values
Message Actions
On SAM_User
Call
SalTblSetContext( tbl1, dfLinha )
Call
SalTblSetFocusRow( tbl1, dfLinha )
Call
SalTblSetFocusCell ( hWndForm, lParam, hWndItem, 0, 1 )
! Call
SalDisableWindow( hWndItem )
! Call
VisWinSetFlags( hWndItem, WF_DisplayOnly, TRUE )
! Call
SalTblSetColumnFlags( hWndItem, COL_ReadOnly, FALSE )
Call
VisWinSetStyle( hWndItem, 0x0020, FALSE )
Column: col3
Class Child Ref Key: 0
Class ChildKey: 0
Class:
Property Template:
Class DLL Name:
Title:
Visible? Yes
Editable? Yes
Maximum Data Length: Default
Data Type: Number
Justify: Left
Width: Default
Width Editable? Yes
Format: Unformatted
Country: Default
Input Mask: Unformatted
Cell Options
Cell Type? Check Box
Multiline Cell? No
Cell DropDownList
Sorted? Yes
Vertical
Scroll? Yes
Auto Drop Down?
No
Allow Text
Editing? Yes
Cell CheckBox
Check Value: 1
Uncheck Value: 0
Ignore Case? Yes
List Values
Message Actions
On SAM_User
Call
SalTblSetContext( tbl1, dfLinha )
Call
SalTblSetFocusRow( tbl1, dfLinha )
Call
SalTblSetFocusCell ( hWndForm, lParam, hWndItem, 0, 1 )
! Call
SalDisableWindow( hWndItem )
! Call
VisWinSetFlags( hWndItem, WF_DisplayOnly, TRUE )
! Call
SalTblSetColumnFlags( hWndItem, COL_ReadOnly, FALSE )
Call
VisWinSetStyle( hWndItem, 0x0020, FALSE )
Functions
Window Variables
Number: nNewRow
Message Actions
On SAM_CornerDoubleClick
Set nNewRow = SalTblInsertRow(
tbl1, TBL_MaxRow )
Set colTexto = "LInha =>
"||SalNumberToStrX( nNewRow, 0 )
Set col1 = FALSE
Set col2 = FALSE
Set col3 = FALSE
On SAM_Click
Call SalDisableWindow( hCol )
Data Field: dfLinha
Class Child Ref Key: 0
Class ChildKey: 0
Class:
Property Template:
Class DLL Name:
Data
Maximum Data Length: Default
Data Type: Number
Editable? Yes
Display Settings
Window Location and Size
Left: 7.883"
Top: 0.881"
Width: 0.8"
Width Editable? Yes
Height: 0.25"
Height Editable? Yes
Visible? Yes
Border? Yes
Justify: Left
Format: Unformatted
Country: Default
Font Name: Default
Font Size: Default
Font Enhancement: Default
Text Color: Default
Background Color: Default
Input Mask: Unformatted
Message Actions
Data Field: dfColuna
Class Child Ref Key: 0
Class ChildKey: 0
Class:
Property Template:
Class DLL Name:
Data
Maximum Data Length: Default
Data Type: Number
Editable? Yes
Display Settings
Window Location and Size
Left: 7.883"
Top: 1.31"
Width: 0.8"
Width Editable? Yes
Height: 0.25"
Height Editable? Yes
Visible? Yes
Border? Yes
Justify: Left
Format: Unformatted
Country: Default
Font Name: Default
Font Size: Default
Font Enhancement: Default
Text Color: Default
Background Color: Default
Input Mask: Unformatted
Message Actions
Pushbutton: pb1
Class Child Ref Key: 0
Class ChildKey: 0
Class:
Property Template:
Class DLL Name:
Title: Disable
Window Location and Size
Left: 7.283"
Top: 1.702"
Width: 1.2"
Width Editable? Yes
Height: 0.298"
Height Editable? Yes
Visible? Yes
Keyboard Accelerator: (none)
Font Name: Default
Font Size: Default
Font Enhancement: Default
Picture File Name:
Picture Transparent Color: None
Image Style: Single
Text Color: Default
Background Color: Default
Message Actions
On SAM_Click
Call SalTblSetContext( tbl1,
dfLinha )
Call SalTblSetFocusRow( tbl1,
dfLinha )
Set hCol =
SalTblGetColumnWindow( tbl1, dfColuna, COL_GetID )
Call SalSendMsg( tbl1,
SAM_Click, 0, 0 )
Pushbutton: pb2
Class Child Ref Key: 0
Class ChildKey: 0
Class:
Property Template:
Class DLL Name:
Title: Processar
Window Location and Size
Left: 7.133"
Top: 3.381"
Width: 1.2"
Width Editable? Yes
Height: 0.298"
Height Editable? Yes
Visible? Yes
Keyboard Accelerator: (none)
Font Name: Default
Font Size: Default
Font Enhancement: Default
Picture File Name:
Picture Transparent Color: None
Image Style: Single
Text Color: Default
Background Color: Default
Message Actions
On SAM_Click
Set nRow = TBL_MinRow
While SalTblFindNextRow( tbl1,
nRow, 0, 0 )
Call SalTblSetContext(
tbl1, nRow )
!
! Verifica se CheckBox
= Marcado e C�lula da Table = Enabled = Processar
! Qdo CheckBox =
Marcado e C�lula da Table = Disable = N�o Processar
!
If tbl1.col1 and
SalIsWindowEnabled( tbl1.col1 )
! Processa dados
If tbl1.col2 and
SalIsWindowEnabled( tbl1.col2 )
! Processa dados
If tbl1.col3 and
SalIsWindowEnabled( tbl1.col3 )
! Processa dados
Background Text: Linha:
Resource Id: 60970
Class Child Ref Key: 0
Class ChildKey: 0
Class:
Window Location and Size
Left: 7.033"
Top: 0.94"
Width: 0.8"
Width Editable? Yes
Height: 0.179"
Height Editable? Yes
Visible? Yes
Justify: Left
Font Name: Default
Font Size: Default
Font Enhancement: Default
Text Color: Default
Background Color: Default
Background Text: Coluna:
Resource Id: 60971
Class Child Ref Key: 0
Class ChildKey: 0
Class:
Window Location and Size
Left: 7.033"
Top: 1.333"
Width: 0.8"
Width Editable? Yes
Height: 0.179"
Height Editable? Yes
Visible? Yes
Justify: Left
Font Name: Default
Font Size: Default
Font Enhancement: Default
Text Color: Default
Background Color: Default
Frame
Resource Id: 60972
Class Child Ref Key: 0
Class ChildKey: 0
Class:
Window Location and Size
Left: 6.833"
Top: 0.595"
Width: 2.1"
Width Editable? Yes
Height: 1.571"
Height Editable? Yes
Visible? Yes
Corners: Square
Border Style: Solid
Border Thickness: 1
Border Color: Default
Background Color: Default
Background Text: Click no Corner da table para incluir
linhas.
Resource Id: 2977
Class Child Ref Key: 0
Class ChildKey: 0
Class:
Window Location and Size
Left: 0.583"
Top: 0.44"
Width: 3.95"
Width Editable? Yes
Height: 0.179"
Height Editable? Yes
Visible? Yes
Justify: Left
Font Name: Default
Font Size: Default
Font Enhancement: Default
Text Color: Default
Background Color: Default
Functions
Window Parameters
Window Variables
Number: nRow
Window Handle: hCol
Message Actions
On SAM_CreateComplete
Call SalCenterWindow( frm1 )
