Jump to content
Fivewin Brasil

Foco no dialogo


Eroni

Recommended Posts

  • 6 months later...

Boa tarde, se alguém já usou dialogo dentro de window, poderia me dar uma luz, sobre como focar no dialogo?

Código abaixo:

#include "FiveWin.ch"

STATIC oFld

function Main()

local oBar

local oWnd

DEFINE WINDOW oWnd From 00,00 to 400,500 TITLE "Teste Eroni" PIXEL COLORS CLR_WHITE,CLR_WHITE

DEFINE BUTTONBAR oBar SIZE 33, 33 _3D OF oWnd

DEFINE BUTTON OF oBar FILE "..\bitmaps\dlg.bmp" MESSAGE "Criar nova aba" ACTION StartFolder( 2,oWnd,oBar )

ACTIVATE WINDOW oWnd on init StartFolder( 1,oWnd,oBar )

return nil

function StartFolder( nOpc,oWnd,oBar )

local oBtn

local oDlg

local oGet

local cGet := Space(10)

if nOpc == 1 // STYLE nOr( WS_CHILD )

DEFINE DIALOG oDlg OF oWnd STYLE nOr( WS_CHILD ) FROM oWnd:nTop+oBar:nHeight, 1 TO oWnd:nHeight, oWnd:nWidth PIXEL COLOR CLR_BLACK, CLR_BLUE

@ 0,0 FOLDER oFld PROMPTS "Teste 1 aba" OF oDlg

// @ 1,1 GET oGet var cGet OF oFld

@ 120, 10 BUTTON oBtn PROMPT "Fechar" OF oDlg SIZE 45, 16 ACTION oDlg:End() PIXEL

ACTIVATE DIALOG oDlg NOWAIT

else

oFld:AddItem( "Mais um" )

oFld:Refresh()

endif

return nil

(48) 3045-1575

xHarbour, FWH & MySql

Link to comment
Share on other sites

Boa tarde, se alguém já usou dialogo dentro de window, poderia me dar uma luz, sobre como focar no dialogo?

Código abaixo:

#include "FiveWin.ch"

STATIC oFld

function Main()

local oBar

local oWnd

DEFINE WINDOW oWnd From 00,00 to 400,500 TITLE "Teste Eroni" PIXEL COLORS CLR_WHITE,CLR_WHITE

DEFINE BUTTONBAR oBar SIZE 33, 33 _3D OF oWnd

DEFINE BUTTON OF oBar FILE "..\bitmaps\dlg.bmp" MESSAGE "Criar nova aba" ACTION StartFolder( 2,oWnd,oBar )

ACTIVATE WINDOW oWnd on init StartFolder( 1,oWnd,oBar )

return nil

function StartFolder( nOpc,oWnd,oBar )

local oBtn

local oDlg

local oGet

local cGet := Space(10)

if nOpc == 1 // STYLE nOr( WS_CHILD )

DEFINE DIALOG oDlg OF oWnd STYLE nOr( WS_CHILD ) FROM oWnd:nTop+oBar:nHeight, 1 TO oWnd:nHeight, oWnd:nWidth PIXEL COLOR CLR_BLACK, CLR_BLUE

@ 0,0 FOLDER oFld PROMPTS "Teste 1 aba" OF oDlg

// @ 1,1 GET oGet var cGet OF oFld

@ 120, 10 BUTTON oBtn PROMPT "Fechar" OF oDlg SIZE 45, 16 ACTION oDlg:End() PIXEL

ACTIVATE DIALOG oDlg NOWAIT

else

oFld:AddItem( "Mais um" )

oFld:Refresh()

endif

return nil

(48) 3045-1575

xHarbour, FWH & MySql

Link to comment
Share on other sites

citação:

Boa tarde, se alguém já usou dialogo dentro de window, poderia me dar uma luz, sobre como focar no dialogo?

Código abaixo:

#include "FiveWin.ch"

STATIC oFld

function Main()

local oBar

local oWnd

DEFINE WINDOW oWnd From 00,00 to 400,500 TITLE "Teste Eroni" PIXEL COLORS CLR_WHITE,CLR_WHITE

DEFINE BUTTONBAR oBar SIZE 33, 33 _3D OF oWnd

DEFINE BUTTON OF oBar FILE "..\bitmaps\dlg.bmp" MESSAGE "Criar nova aba" ACTION StartFolder( 2,oWnd,oBar )

ACTIVATE WINDOW oWnd on init StartFolder( 1,oWnd,oBar )

return nil

function StartFolder( nOpc,oWnd,oBar )

local oBtn

local oDlg

local oGet

local cGet := Space(10)

if nOpc == 1 // STYLE nOr( WS_CHILD )

DEFINE DIALOG oDlg OF oWnd STYLE nOr( WS_CHILD ) FROM oWnd:nTop+oBar:nHeight, 1 TO oWnd:nHeight, oWnd:nWidth PIXEL COLOR CLR_BLACK, CLR_BLUE

@ 0,0 FOLDER oFld PROMPTS "Teste 1 aba" OF oDlg

// @ 1,1 GET oGet var cGet OF oFld

@ 120, 10 BUTTON oBtn PROMPT "Fechar" OF oDlg SIZE 45, 16 ACTION oDlg:End() PIXEL

ACTIVATE DIALOG oDlg NOWAIT ON INIT ( oDlg:SetFocus() )id=red>

else

oFld:AddItem( "Mais um" )

oFld:Refresh()

endif

return nil

(48) 3045-1575

xHarbour, FWH & MySql


id=quote>id=quote>

Perfil.jpg

Link to comment
Share on other sites

Oi, eu testei o teu codigo e problema esta em STYLE

DEFINE DIALOG oDlg OF oWnd STYLE nOr( WS_CHILD )id=red> FROM oWnd:nTop+oBar:nHeight, 1 TO oWnd:nHeight, oWnd:nWidth PIXEL COLOR CLR_BLACK, CLR_BLUE

quando tira ai cria a dialog fora e funciona...

ai vc vai que testar os outros tipos de STYLE e vê o que funciona para você, ou sem tem alguma outra solução para a tua necessidade.

Perfil.jpg

Link to comment
Share on other sites

Boa Tarde ..

Não entendi, o que seira o "Focar" na dialog ?

Eu sempre usei e uso dialog dentro da window, e semnpre que aciono a dialog o cursor já cai dentro dos controles... seria isso ??

Abraços

Feliz Ano novo ..

Luiz Arruda

Corumbá-MS

ico.corumba@gmail.com |

http://www.facebook.com/profile.php?id=100000933378029

euchapeu.png

FiveWin 9.04

xHarbour

PellesC

Bcc.

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...