when using DIALOG instead of WINDOW i can not "maximize"
WRONG.
Use "RESIZABLE" clause while defining the DIALOG. Ref: dialog.ch
also BUTTONBAR does not appear when use oWnd:oClient := oBrwDBF ...
ALSO WRONG.
Just oDlg:Resize().
Test program (build and run in fwh\samples folder)
- Code: Select all Expand view
#include "fivewin.ch"
REQUEST DBFCDX
function Main()
local oDlg, oFont, oBar, oBrw, cAlias
USE CUSTOMER NEW SHARED ALIAS ( cAlias := cGetNewAlias( "CUST" ) ) VIA "DBFCDX"
DEFINE FONT oFont NAME "VERDANA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 600,400 PIXEL TRUEPIXEL RESIZABLE FONT oFont ;
TITLE "FWH: RESIZABLE DIALOG"
DEFINE BUTTONBAR oBar SIZE 90,30 2007
DEFINE BUTTON OF oBar PROMPT "This is the" CENTER
DEFINE BUTTON OF oBar PROMPT "Button Bar" CENTER
@ 0,0 XBROWSE oBrw SIZE 0,0 PIXEL OF oDlg ;
DATASOURCE Alias() AUTOCOLS CELL LINES ;
AUTOSORT FOOTERS FASTEDIT NOBORDER
oBrw:AutoFit()
oBrw:CreateFromCode()
oDlg:oClient := oBrw
oDlg:bInit := <||
SET MESSAGE OF oDlg TO "Message Bar" CENTERED 2007
oDlg:Resize()
return nil
>
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
( cAlias )->( DBCLOSEAREA() )
return nil
so DIALOG is only when i do not want "resize" (which i most allow)
WRONG CONCLUSION, obviously.