HWGUI e ordem das janelas

Projeto HwGui - Biblioteca visual para Harbour/xHarbour

Moderador: Moderadores

Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

HWGUI e ordem das janelas

Mensagem por JoséQuintas »

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 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/
Avatar do usuário
Itamar M. Lins Jr.
Administrador
Administrador
Mensagens: 7928
Registrado em: 30 Mai 2007 11:31
Localização: Ilheus Bahia
Curtiu: 1 vez

HWGUI e ordem das janelas

Mensagem por Itamar M. Lins Jr. »

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.

Código: Selecionar todos

// 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!

Código: Selecionar todos

/* 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

Código: Selecionar todos

// 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.

Código: Selecionar todos

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.
Saudações,
Itamar M. Lins Jr.
Responder