Clipper On Line • Ver Tópico - HWGUI e ordem das janelas

HWGUI e ordem das janelas

Projeto HwGui - Biblioteca visual para Harbour/xHarbour

Moderador: Moderadores

 

HWGUI e ordem das janelas

Mensagempor JoséQuintas » 12 Fev 2020 20:44

Já alteraram a HWGUI pra não precisar seguir ordem nas janelas?
Tipo .... abrir janelas à vontade, e fechar à vontade, sem ter que seguir sequência igual console?

É que tô pensando no seguinte:
Já que as alterações pra MySQL estão gerando inconvenientes....
Melhor já mudar o visual, assim o cliente tem um motivo mais visível...
José M. C. Quintas
Harbour 3.2, mingw, gtwvg, multithread, dbfcdx, ADO+MySql, PNotepad
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar de usuário

JoséQuintas
Membro Master

Membro Master
 
Mensagens: 18007
Data de registro: 26 Fev 2007 11:59
Cidade/Estado: São Paulo-SP
Curtiu: 15 vezes
Mens.Curtidas: 1206 vezes

HWGUI e ordem das janelas

Mensagempor Itamar M. Lins Jr. » 12 Fev 2020 21:28

Ola!
Até onde sei na Hwgui tem a janela principal e vc pode optar por abrir dialogs, modais ou não e janelas filhas que são abertas debaixo/dentro da principal. Os dialogs são livres.
// Every HwGUI application must include hwgui.ch header file
#include "hwgui.ch"
Function Test
   Local oMain

   // Most of GUI applications creates the main window:
   INIT WINDOW oMain MAIN TITLE "My First HwGUI sample" AT 100, 100 SIZE 400, 300

   /*   Here you can place definitions of menu and window controls
    *   Then the window must be activated - it appears on the screen
    *   and the application goes to the main loop of handling messages.
    */
   ACTIVATE WINDOW oMain
 
Return Nil

Dialogs!
/* A dialog box is a temporary window an application creates to
get user input. An application typically uses dialog boxes to prompt the user
for some information. A dialog box usually contains one or more controls,
with which the user enters text and chooses options.
A modal dialog box becomes active after creation and neither the
user nor the application can make the owner window active until this dialog
box is destroyed. */
#include "hwgui.ch"
Function Test
   Local oDlg, oFont, oEdit1

   PREPARE FONT oFont NAME "MS Sans Serif" WIDTH 0 HEIGHT -13

   INIT DIALOG oDlg TITLE "Modal dialog" AT 100, 100 SIZE 300, 150 FONT oFont

   @ 100,100 BUTTON "Close" SIZE 100,30 ;
         ON CLICK {|| oDlg:Close() }

   ACTIVATE DIALOG oDlg
 
Return Nil

Não modal/Livre
// Modeless dialog doesn't prevent any other window to become active.
#include "hwgui.ch"
Function Test
   Local oDlg, oFont, oEdit1

   PREPARE FONT oFont NAME "MS Sans Serif" WIDTH 0 HEIGHT -13

   INIT DIALOG oDlg TITLE "Modeless dialog" AT 100, 100 SIZE 300, 150 FONT oFont

   @ 20,20 SAY "Input: " SIZE 60, 24
   // The ON SIZE clause in EDITBOX definition handles the control's
   //  behaviour while the parent window resizing. More details will be later.
   @ 80,20 EDITBOX oEdit1 CAPTION "" SIZE 200,26 ;
         ON SIZE ANCHOR_LEFTABS + ANCHOR_RIGHTABS

   @ 100,100 BUTTON "Close" SIZE 100,30 ;
         ON CLICK {|| hwg_MsgInfo( oEdit1:value, "Edit value" ), oDlg:Close() }

   // You see, we add here a magic word NOMODAL
   ACTIVATE DIALOG oDlg NOMODAL
 
Return Nil


E tem a MDI.
INIT WINDOW oMainWindow MDI TITLE "Example" SIZE 800,500 ;
         MENUPOS 3 BACKCOLOR 16744703
...
   INIT WINDOW oChildWnd MDICHILD TITLE "Child" STYLE WS_VISIBLE + WS_OVERLAPPEDWINDOW


Fica dentro da outra, não uso assim, uso dialog.
Verifique na pasta samples a.pŕg que tem o código completo.

Saudações,
Itamar M. Lins Jr.
Avatar de usuário

Itamar M. Lins Jr.
Colaborador

Colaborador
 
Mensagens: 6927
Data de registro: 30 Mai 2007 11:31
Cidade/Estado: Ilheus Bahia
Curtiu: 309 vezes
Mens.Curtidas: 503 vezes




Retornar para HwGui

Quem está online

Usuários vendo este fórum: Nenhum usuário registrado online e 3 visitantes


Ola Amigo, espero que meu site e forum tem lhe beneficiado, com exemplos e dicas de programacao.
Entao divulgue o link da Doacao abaixo para seus amigos e redes sociais ou faça uma doacao para o site forum...
MUITO OBRIGADO PELA SUA DOACAO!
Faça uma doação para o forum
cron
v
Olá visitante, seja bem-vindo ao Fórum Clipper On Line!
Efetue o seu login ou faça o seu Registro