I want show all dialogs pressing the Vscroll of the main window
I not see the dialogs
I see the dialog only if I resize the window why ?
I see the dialog only I no use mdi and vscroll and I can see only the first 4 dialogs
is there a bug ?
look and try this sample test
- Code: Select all Expand view RUN
#include "FiveWin.ch"
#include "Constant.ch"
staTic oWnd,oBar
Function main()
local oBar,oWnd
DEFINE WINDOW oWnd TITLE "DIALOGS generation";
MDI VSCROLL MENU ;
BUILDMENU()
*COLOR CLR_WHITE, CLR_WHITE
DEFINE BUTTONBAR oBar 3D SIZE 25, 25 OF oWnd 2007
DEFINE BUTTON OF oBar ACTION CREA()
SET MESSAGE OF oWnd TO "Testing DIALOGS" ;
CENTERED CLOCK KEYBOARD 2007
ACTIVATE WINDOW oWnd MAXIMIZED
return nil
// small menu
FUNCTION BuildMenu()
local oMenu
MENU oMenu 2007
MENUITEM "&File"
MENU
MENUITEM i18n( "Printer" ) ;
ACTION PrinterSetup() ;
MESSAGE i18n( " Printer setup. " )
SEPARATOR
MENUITEM i18n( "Exit" ) ;
ACTION oWnd:End() ;
MESSAGE i18n( " Go home. " )
ENDMENU
ENDMENU
RETURN oMenu
FUNCTION CREA()
Local nheight := 100
Local nWidth := 800
Local nLeft := 20
Local nStyle := nOR( WS_CHILD,WS_BORDER, 4 )
Local nColor := SetColor( CLR_RED,CLR_WHITE )
Local n
Local nTotale
Local oFont := TFont():New(GetSysFont(),0,-18,,.f.,,,,)
Local oDlg:={ }
//I want create the first dialog over the buttonbar
Local nheight_init := oWnd:oBar:nheight
USE DIALOGS ALIAS DIALOGS
INDEX on DIALOGS->NUMBER TO DIALOGS
nTotale:= dialogs->(reccount())
oDlg:=array(nTotale) // load an array with total of records
n=1
do while !eof()
// create the dialog
DEFINE DIALOG oDlg[n]
oDlg[n]:nTop:= nheight_init
oDlg[n]:nBottom:= nheight
oDlg[n]:nRight:=nWidth
oDlg[n]:nLeft := nLeft
oDlg[n]:nStyle :=nStyle
oDlg[n]:SetColor( CLR_RED,CLR_WHITE )
oDlg[n]:cTitle := dialogs->NAME_DLGS
// now write the number of dialog
@ nheight_init, nLeft SAY str(recno()) OF oWnd COLOR CLR_RED,CLR_WHITE FONT oFont
ACTIVATE DIALOG oDlg[n] NOWAIT
ON INIT oDlg[n]:Move( 20, 20, 50, 50, .T. )
dbskip()
// now I want move the ntop down the bottom of first dialog
nheight_init:= nheight_init+2
nheight := oDlg[n]:nBottom + 100
n:=n+1
ENDDO
for the dbf you must create a simply dbf name dialogs with these field
NUMBER N 3 0
NAME_DLGS C 10 0
I HOPE YOU FOUND THE ERROR , THANKS