Habilitar/desatiblitar hedit
Moderador: Moderadores
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Habilitar/desatiblitar hedit
Não encontrei aonde habilitar/desabilitar o hedit
Tem como?
Tem como?
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Habilitar/desatiblitar hedit
Encontrei este post
http://pctoledo.com.br/forum/viewtopic.php?f=46&t=24231
Lá diz sobre Enable() Disable() mas não funcionou.
http://pctoledo.com.br/forum/viewtopic.php?f=46&t=24231
Lá diz sobre Enable() Disable() mas não funcionou.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Habilitar/desatiblitar hedit
Código: Selecionar todos
@ nCol + Int( ::nFontSize * 11 ), nRow GET oControl VAR aEdit[ HEDIT_VALUE ] SIZE aEdit[ DBS_LEN ] * Int( ::nFontSize * 1.2 ), Int( ::nFontSize * 2 ) ;
STYLE iif( aEdit[ DBS_TYPE ] == "N", ES_RIGHT, ES_LEFT ) ;
MAXLENGTH aEdit[ DBS_LEN ]
oControl:Disable()
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Habilitar/desatiblitar hedit
E pelo erro, ainda vai ter mais problemas.
Sei lá que bagunça isso vai gerar depois.
Isso pode atrapalhar trabalhar com objetos.
Está sendo atribuído o mesmo nome a todos os controles, oBtn pra button, oControl pra hedit.SYSTEM ERROR
Error BASE/1004 No exported method: DISABLE
Called from DISABLE(0)
Called from ONEFRMCLASS:TELACREATE(222)
Called from ONEFRMCLASS:EXECUTE(108)
Called from EXECUTE(35)
Called from PTESHWGUICADASTRO(24)
Called from DO(0)
Called from DOPRG(144)
Called from (b)RUNMODULE(120)
(1) = Tipo: A Valor: __itemSetObj( __itemSetRef( {{{"OBJNAME", "OBTN"}, {"OPARENT", {{"TITLE", "teste"}, {"TYPE", 11}, {"NTOP", 0}, {"NLEFT", 0}, {"NWIDTH", 1188}, {"NHEIGHT", 798}, {"BRUSH",
Sei lá que bagunça isso vai gerar depois.
Isso pode atrapalhar trabalhar com objetos.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Habilitar/desatiblitar hedit
Código: Selecionar todos
FOR nCont = 1 TO Len( ::oFrm:aControls )
IF __ObjHasMsg( ::oFrm:aControls[ nCont ], "BSETGET" ) .AND. ::oFrm:aControls[ nCont ]:bSetGet != Nil
::oFrm:aControls[ nCont ]:Disable()
ENDIF
NEXT
Acho que era HWGUI 2.17
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Habilitar/desatiblitar hedit
Pelo nome da classe também não.
Código: Selecionar todos
FOR nCont = 1 TO Len( ::oFrm:aControls )
IF ::oFrm:aControls[ nCont ]:winClass== "EDIT"
::oFrm:aControls[ nCont ]:Disable()
ENDIF
NEXT
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Habilitar/desatiblitar hedit
E a classe tem os métodos.
por herança.
Sei lá...
Código: Selecionar todos
CLASS HEdit INHERIT HControl
CLASS VAR winclass INIT "EDIT"
Código: Selecionar todos
CLASS HControl INHERIT HCustomWindow
DATA id
DATA tooltip
DATA lInit INIT .F.
DATA Anchor INIT 0
METHOD New( oWndParent, nId, nStyle, nLeft, nTop, nWidth, nHeight, ;
oFont, bInit, bSize, bPaint, cTooltip, tcolor, bColor )
METHOD NewId()
METHOD Init()
METHOD Disable()
METHOD Enable()
METHOD Enabled( lEnabled ) SETGET
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Habilitar/desatiblitar hedit
Tentei pelo SETGET, mas depois olhei o fonte e dá no mesmo.
Pra quem não sabe, METHOD SETGET é para atribuição de valores.
Define parecido com função, mas como SETGET vale pra isso acima.
Código: Selecionar todos
...
METHOD Enabled( lEnabled ) SETGET
...
METHOD Disable() CLASS HControl
hwg_Enablewindow( ::handle, .F. )
RETURN NIL
METHOD Enable() CLASS HControl
hwg_Enablewindow( ::handle, .T. )
RETURN NIL
METHOD Enabled( lEnabled ) CLASS HControl
IF lEnabled != Nil
IF lEnabled
hwg_Enablewindow( ::handle, .T. )
RETURN .T.
ELSE
hwg_Enablewindow( ::handle, .F. )
RETURN .F.
ENDIF
ENDIF
RETURN hwg_Iswindowenabled( ::handle )
Código: Selecionar todos
oControl:Enabled := .F.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Habilitar/desatiblitar hedit
Tentei também com a dialog em andamento....
De repente o controle precisava estar criado pra isso funcionar.
Nada feito.
De repente o controle precisava estar criado pra isso funcionar.
Nada feito.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Habilitar/desatiblitar hedit
Fonte relativamente simples.... pra quem usa classe...
Código: Selecionar todos
#include "hbclass.ch"
#include "hwgui.ch"
#include "dbstruct.ch"
#include "directry.ch"
#include "hbgtinfo.ch"
#include "ze_rmchart.ch"
#define HEDIT_VALUE 5
#define HEDIT_CONTROL 6
PROCEDURE PTEShwguiCadastro( cModule, cTitle, ... )
LOCAL aFileList, aFile
(cModule)
(cTitle)
SET EXCLUSIVE OFF
aFileList := Directory( "*.dbf" )
IF Len( aFileList ) == 0
? "sem arquivos para teste"
Inkey(0)
ENDIF
FOR EACH aFile IN aFileList
Execute( hb_FNameName( aFile[ F_NAME ] ) )
NEXT
RETURN
FUNCTION Execute( cFile )
LOCAL oFrm
oFrm := OneFrmClass():New( "teste", "teste", "CIAGEPU+-" )
oFrm:cFileDBF := cFile
oFrm:Execute()
RETURN Nil
CREATE CLASS OneFrmClass INHERIT FrmClass
// To create specific frm derived from main
ENDCLASS
CREATE CLASS FrmClass
VAR oFrm
VAR cPRGName
VAR cOptions
VAR cTitulo
VAR cFileDBF
VAR hEditList INIT {}
VAR nFontSize INIT 10
METHOD New( cTitulo, cModulo, cOptions, cFileDBF )
METHOD CreateButtons()
METHOD Execute()
METHOD Consulta() INLINE Nil
METHOD Altera() INLINE Nil
METHOD Exclui() INLINE Nil
METHOD Inclui() INLINE Nil
METHOD Primeiro() INLINE &( ::cFileDbf )->( dbgotop() ), ::TelaUpdate()
METHOD Ultimo() INLINE &( ::cFileDbf )->( dbgobottom() ), ::TelaUpdate()
METHOD Seguinte() INLINE &( ::cFileDbf )->( dbSkip() ), ::TelaUpdate()
METHOD Anterior() INLINE &( ::cFileDbf )->( dbSkip( -1 ) ), ::TelaUpdate()
METHOD Sair() INLINE ::oFrm:Close()
METHOD Grafico()
METHOD TelaUpdate()
METHOD TelaCreate()
ENDCLASS
METHOD New( cTitulo, cModulo, cOptions, cFileDBF ) CLASS FrmClass
::cPRGName := cModulo
::cOptions := cOptions
::cTitulo := cTitulo
::cFileDBF := cFileDBF
::nFontSize := hb_gtInfo( HB_GTI_FONTWIDTH )
RETURN Self
METHOD Grafico()
LOCAL aColors := { RMC_COLOR_LIGHT_GREEN, RMC_COLOR_YELLOW, RMC_COLOR_GOLDENROD, RMC_COLOR_CRIMSON }
LOCAL aData := { 40, 30, 60, 20 }
LOCAL oRmChart := RMChartClass():New()
LOCAL ID_RMC1 := 1
oRmChart:CreateChart( hwg_GetActiveWindow(), ID_RMC1, 0, 0, 790, 590, RMC_COLOR_MIDNIGHT_BLUE, RMC_CTRLSTYLEIMAGE, .F., "seasky.jpg", "Tahoma", 0, RMC_COLOR_DEFAULT )
oRMChart:AddRegion( ID_RMC1, 5, 5, -5, -5, "", .F. )
oRMChart:AddLegend( ID_RMC1, 1, "Apples*Citrons*Bananas*Cherries", RMC_LEGEND_CUSTOM_CENTER, RMC_COLOR_DEFAULT, RMC_LEGENDNORECT, RMC_COLOR_WHITE, 8, .F. )
oRmChart:AddGridlessSeries( ID_RMC1, 1, aData, 4, aColors, 4, RMC_DONUT_GRADIENT, RMC_FULL, 0, .F., RMC_VLABEL_TWIN, RMC_HATCHBRUSH_OFF, 0 )
oRmChart:SetWatermark( RMC_USERWM, RMC_USERWMCOLOR, RMC_USERWMLUCENT, RMC_USERWMALIGN, RMC_USERFONTSIZE )
oRmChart:Draw( ID_RMC1 )
ORMChart:Reset( ID_RMC1 )
RETURN Nil
METHOD Execute() CLASS FrmClass
SELECT 0
USE ( ::cFileDBF )
INIT DIALOG ::oFrm CLIPPER NOEXIT TITLE ::cTitulo ;
AT AppWindowRect( 1 ), AppWindowRect( 2 ) SIZE AppWindowRect( 3 ), AppWindowRect( 4 ) ;
BACKCOLOR ze_DlgBackColor() ON EXIT hwg_EndDialog()
::CreateButtons()
::TelaCreate()
ACTIVATE DIALOG ::oFrm CENTER
RETURN Nil
METHOD CreateButtons() CLASS FrmClass
LOCAL nRow, nCol, acOptions := {}, cCaption, bCode, oBtn, cIcon, nRowLine := 1, nCont
//PREPARE FONT oFont NAME "Times New Roman" WIDTH 0 HEIGHT 20 WEIGHT 400
IF "I" $ ::cOptions
AAdd( acOptions, "Inclui" )
ENDIF
IF "A" $ ::cOptions
AAdd( acOptions, "Altera" )
ENDIF
IF "C" $ ::cOptions
AAdd( acOptions, "Consulta" )
ENDIF
IF "E" $ ::cOptions
AAdd( acOptions, "Exclui" )
ENDIF
IF "P" $ ::cOptions
AAdd( acOptions, "Primeiro" )
ENDIF
IF "-" $ ::cOptions
AAdd( acOptions, "Anterior" )
ENDIF
IF "+" $ ::cOptions
AAdd( acOptions, "Seguinte" )
ENDIF
IF "U" $ ::cOptions
AAdd( acOptions, "Último" )
ENDIF
IF "G" $ ::cOptions
AAdd( acOptions, "Grafico" )
ENDIF
AAdd( acOptions, "Sair" )
FOR nCont = 1 TO 10
AAdd( acOptions, "test" + Ltrim( Str( nCont ) ) )
NEXT
nCol := 10
nRow := 10
FOR EACH cCaption IN acOptions
DO CASE
CASE cCaption == "Consulta"; cIcon := "icoSearch" ; bCode := { || ::Consulta() }
CASE cCaption == "Inclui"; cIcon := "icoPlus" ; bCode := { || ::Inclui() }
CASE cCaption == "Altera"; cIcon := "icoEdit" ; bCode := { || ::Altera() }
CASE cCaption == "Exclui"; cIcon := "icoTrash" ; bCode := { || ::Exclui() }
CASE cCaption == "Primeiro"; cIcon := "icoGoFirst" ; bCode := { || ::Primeiro() }
CASE cCaption == "Último"; cIcon := "icoGoLast" ; bCode := { || ::Ultimo() }
CASE cCaption == "Seguinte"; cIcon := "icoGoRight" ; bCode := { || ::Seguinte() }
CASE cCaption == "Anterior"; cIcon := "icoGoLeft" ; bCode := { || ::Anterior() }
CASE cCaption == "Grafico"; cIcon := "icoChart" ; bCode := { || ::Grafico() }
CASE cCaption == "Sair"; cIcon := "icoDoor" ; bCode := { || ::Sair() }
OTHERWISE ; cIcon := "AppIcon" ; bCode := { || Nil }
ENDCASE
@ nCol, nRow OWNERBUTTON oBtn OF ::oFrm SIZE 80, 80 ;
ON CLICK bCode ;
BITMAP HICON():AddResource( cIcon, 60, 60 ) COORDINATES 5, 5, 60, 60 ;
TEXT cCaption COORDINATES 5, 61, 75, 5 ;
Tooltip cCaption
oBtn:aStyle := ze_StyleBtn()
//@ nCol, nRow ICON IconFromCaption( cCaption ) ;
// FROM RESOURCE ;
// SIZE 55, 55 ;
// ON CLICK bCode ;
// TOOLTIP cCaption
//@ nCol, nRow BUTTONEX cCaption ;
// SIZE 55,55 ;
// ICON Atail( ::aIconList ) ;
// TRANSPARENT
IF nRowLine == 1 .AND. nCol > AppWindowRect( 3 ) - AppWindowRect( 1 ) - 10 - 85
nRowLine += 1
nRow += 85
nCol := AppWindowRect( 3 ) - AppWindowRect( 1 ) - 10
ENDIF
nCol += iif( nRowLine == 1, 85, -85 )
NEXT
RETURN Nil
METHOD TelaCreate() CLASS FrmClass
LOCAL oElement, nRow, nCol, aEdit, oControl, nCont
::hEditList := dbStruct()
FOR EACH oElement IN ::hEditList
aSize( oElement, 6 )
oElement[ HEDIT_VALUE ] := &( ::cFileDbf )->( FieldGet( oElement:__EnumIndex ) )
NEXT
nRow := Int( ::nFontSize * 11 )
nCol := Int( ::nFontSize / 2 )
FOR EACH aEdit IN ::hEditList
IF nCol + Int( ::nFontSize * 5 ) + aEdit[ DBS_LEN ] * int( ::nFontSize * 1.2 ) + Int( ::nFontSize * 5 ) > AppWindowRect( 3 ) - AppWindowRect( 1 ) - ::nFontSize * 2
nCol := Int( ::nFontSize / 2 )
nRow += Int( ::nFontSize * 2.5 )
ENDIF
@ nCol, nRow SAY aEdit[ DBS_NAME ] SIZE Int( ::nFontSize * 10 ), Int( ::nFontSize * 2 ) TRANSPARENT
@ nCol + Int( ::nFontSize * 11 ), nRow GET oControl VAR aEdit[ HEDIT_VALUE ] SIZE aEdit[ DBS_LEN ] * Int( ::nFontSize * 1.2 ), Int( ::nFontSize * 2 ) ;
STYLE iif( aEdit[ DBS_TYPE ] == "N", ES_RIGHT, ES_LEFT ) ;
MAXLENGTH aEdit[ DBS_LEN ]
aEdit[ HEDIT_CONTROL ] := oControl
IF aEdit:__EnumIndex < 5
nCol += 5000
ELSE
nCol += Int( ::nFontSize * 10 ) + aEdit[ DBS_LEN ] * Int( ::nFontSize * 1.2 ) + Int( ::nFontSize * 5 )
ENDIF
NEXT
FOR nCont = 1 TO Len( ::oFrm:aControls )
IF ::oFrm:aControls[ nCont ]:winClass == "EDIT"
::oFrm:aControls[ nCont ]:Enabled := .F.
ENDIF
NEXT
RETURN Nil
METHOD TelaUpdate() CLASS frmClass
LOCAL aEdit, nCont
FOR EACH aEdit IN ::hEditList
aEdit[ HEDIT_CONTROL ]:Value( &( ::cFileDbf )->( FieldGet( aEdit:__EnumIndex ) ) )
NEXT
FOR nCont = 1 TO Len( ::oFrm:aControls )
IF ::oFrm:aControls[ nCont ]:winClass == "EDIT"
::oFrm:aControls[ nCont ]:Enabled := .F.
ENDIF
NEXT
RETURN Nil
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Habilitar/desatiblitar hedit
Será que precisa fazer um por um ?
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Habilitar/desatiblitar hedit
Pra esse a mais acrescentei o nome na lista
a configuração
e o método
Código: Selecionar todos
AAdd( acOptions, "ControlList" )
Código: Selecionar todos
CASE cCaption == "ControlList" ; cIcon := "AppIcon" ; bCode := { || ::ControlList() }
Código: Selecionar todos
METHOD ControlList() CLASS frmClass
LOCAL oControl, cTxt := "", cTxtTmp := ""
FOR EACH oControl IN ::oFrm:aControls
IF Len( cTxtTmp ) > 500
cTxt += cTxtTmp + hb_Eol()
cTxtTmp := ""
ENDIF
cTxtTmp += oControl:winClass + Ltrim( Str( oControl:id ) ) + " "
NEXT
cTxt += cTxtTmp
hwg_MsgInfo( cTxt )
RETURN Nil
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Habilitar/desatiblitar hedit
Não tem a ver com o tópico, mas isto deu certo:
Acrescentei 10 opções a mais pra testar.
Se os botões não cabem na linha de cima, vai usando a linha de baixo de trás pra frente.
O difícil vai, mas o fácil não.
Falta isso de ativar/desativar hedit.
Código: Selecionar todos
AAdd( acOptions, "Sair" )
AAdd( acOptions, "ControlList" )
FOR nCont = 1 TO 10
AAdd( acOptions, "test" + Ltrim( Str( nCont ) ) )
NEXT
Se os botões não cabem na linha de cima, vai usando a linha de baixo de trás pra frente.
O difícil vai, mas o fácil não.
Falta isso de ativar/desativar hedit.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Habilitar/desatiblitar hedit
Lembrei de outro teste, e já vi que tem outra situação: button:Enabled := .F.
Ao desabilitar os botões, ficaram sem ícone, mas tá passando por eles.
Código: Selecionar todos
IF "test" $ cCaption
oBtn:lEnabled := .F.
ENDIF
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
Habilitar/desatiblitar hedit
Como eu imaginava, não desabilitou não, apenas removeu o ícone
Código: Selecionar todos
OTHERWISE ; cIcon := "AppIcon" ; bCode := { || hwg_MsgInfo( cCaption ) }
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/