Após o browse da hwgui, como não tem LastKey() ou algo assim, como saber se foi selecionado ou não?
Só criando uma variável ou tem outra opção?
Como saber o resultado do browse?
Moderador: Moderadores
- JoséQuintas
- Administrador

- Mensagens: 20415
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
- Curtiram: 1 vez
Como saber o resultado do browse?
José M. C. Quintas
Harbour 3.2, mingw, multithread, gtwvg, fivewin 25.12, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui), (hmg3), (hmg extended), (oohg), PNotepad, ASP, (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, multithread, gtwvg, fivewin 25.12, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui), (hmg3), (hmg extended), (oohg), PNotepad, ASP, (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: 20415
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
- Curtiram: 1 vez
Como saber o resultado do browse?
Por enquanto quebrei o galho assim.
Código: Selecionar todos
@ 11, 101 BROWSE ARRAY oBrowse ;
SIZE AppWindowRect( 3 ) - 10 - 10, AppWindowRect( 4 ) - 10 - 100 STYLE WS_BORDER + WS_VSCROLL + WS_HSCROLL + DS_CENTER ;
ON CLICK { || lSelected := .T., oDlg:Close() }
Código: Selecionar todos
STATIC FUNCTION oBrowseKey( oDlg, oBrowse, nKey, cFilter, lSelected )
nKey := hb_KeyStd( nKey )
DO CASE
CASE nKey == VK_RETURN .OR. nKey = VK_ESCAPE
IF nKey == VK_RETURN
lSelected := .T.
ENDIF
oDlg:Close()
RETURN .F.
José M. C. Quintas
Harbour 3.2, mingw, multithread, gtwvg, fivewin 25.12, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui), (hmg3), (hmg extended), (oohg), PNotepad, ASP, (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, multithread, gtwvg, fivewin 25.12, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui), (hmg3), (hmg extended), (oohg), PNotepad, ASP, (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/
-
alxsts
- Colaborador

- Mensagens: 3107
- Registrado em: 12 Ago 2008 15:50
- Localização: São Paulo-SP-Brasil
Como saber o resultado do browse?
Olá!
Se alguma linha for selecionada, oBr:aSelected conterá uma cópia das colunas da linha selecionada.
Se alguma linha for selecionada, oBr:aSelected conterá uma cópia das colunas da linha selecionada.
[]´s
Alexandre Santos (AlxSts)
Alexandre Santos (AlxSts)
- JoséQuintas
- Administrador

- Mensagens: 20415
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
- Curtiram: 1 vez
Como saber o resultado do browse?
Código: Selecionar todos
ACTIVATE DIALOG oDlg CENTER
IF Len( oBrowse:aSelected ) != 0
MsgExclamation( "Tem coisa em aSelected" )
ENDIF
IF lSelected .AND. bCode != Nil
José M. C. Quintas
Harbour 3.2, mingw, multithread, gtwvg, fivewin 25.12, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui), (hmg3), (hmg extended), (oohg), PNotepad, ASP, (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, multithread, gtwvg, fivewin 25.12, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui), (hmg3), (hmg extended), (oohg), PNotepad, ASP, (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/
-
Fernando queiroz
- Usuário Nível 4

- Mensagens: 783
- Registrado em: 13 Nov 2014 00:41
- Localização: Porto Alegre/RS
Como saber o resultado do browse?
Código: Selecionar todos
@ 157,9 OWNERBUTTON oOwnerbutton3 OF oPanel1 SIZE 73,63 ;
ON CLICK {|| ::MANUTENCAO_EXCLUI( LTRIM(str(oPage1:oBrowse1:aArray[ oPage1:oBrowse1:nCurrent, 1]))) , oPage1:oBrowse1:aArray := ::MANUTENCAO_CARREGA( "ORDER BY " + cAlvo_Consulta ), ::MANUTENCAO_onDlgInit( oDlg), obrowse1:REFRESH() };
FLAT ;
TEXT 'Exclui' COLOR 16777215 ;
COORDINATES 0, 40, 0, 0 ;
BITMAP HBitmap():Addresource('delete-256-30') ;
COORDINATES 0, 5, 0, 0 ;
TOOLTIP 'Exclui Produtos'
oOwnerbutton3:aStyle := OwnerbuttonStyleai eu estou passando para o metodo a variavel que eu quero do browse, no caso estou passando o array oPage1:oBrowse1:aArray
indexado com o primeiro campo [ oPage1:oBrowse1:nCurrent, 1]
HARBOUR 3.2, HWGUI 2.23 B7, SEFAZCLASS, PDFClass, ADO + MariaDB/MySQL, RMChart, Python + FASTAPI , Android Kotlin