during my work on the new xBrowse-tools, i have a problem with Folders :
In all FWH-samples, the pages are included in the main-dialog.
In my old sources, i have done the same with no problem.
But now, because of many options, i have to write a extra function for each page.
When i do it, i cannot see the browsers.
As a test, i included the first browser in the main-dialog.
Then, i can see the browser. The slider, i couldn't show, because he is included in FUNCTION BRWGRAD(oDlg,oFld) as well.
There was a problem with sliders and pages.
I have done some tests with FWH-sample Testfld6.prg
after some tryouts, i got it working but the prg-structure is different there.
To carry on, i included the pages to the main-function :
The 1. Page belongs to Header- and Footer - Size and Gradients.
Page 2 will be bitmap- and background preview
Page 3 will be Line-defines.
some more will follow
The 1. page will be finished today and can be used allready for
xBrowse - header / footer-design.
I have still to add the color-control-fields.
Maybe it is better to change text : 3. Color in < Rollover > ? ( for Mouse )
Is it possible, to have different fonts for Header + Footer and Data ?
Otherwise i will use the selected font in all parts.
- Code: Select all Expand view
#include "FiveWin.ch"
#include "xBrowse.ch"
#include "folder.ch"
#include "Slider.ch"
static oWnd, oFld
FUNCTION Main()
local oBar, oBtn1
DEFINE WINDOW oWnd TITLE "xBROWSE" MDI MENU TMenu():New()
DEFINE BUTTON oBtn1 OF oBar ACTION ( Tools(oWnd,oBar,oBtn1), lOPEN := .T., oBtn1:Disable() ) ;
RESOURCE "magic" PROMPT "xBrowse-Selection" TOOLTIP "xBROWSE-Settings"
...
...
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON PAINT gradpaint1( hDC, oWnd ) ;
VALID MsgYesNo( "Do you want to end?" )
RETURN NIL
//----------------- DIALOG ----------------------------------------------//
FUNCTION Tools(oWnd,oBar,oBtn1)
local oDlg
nFOLDERPOS := 1
DEFINE DIALOG oDlg RESOURCE "Dialog" OF oWnd TITLE "xBROWSE-Color-Selection" FONT oProgFont
...
...
REDEFINE FOLDER oFld ID 110 OF oDlg ;
PROMPTS " &Header / Footer ", " &Bitmaps ", " &Cell-Lines " ;
DIALOGS "Browse1","Browse2","Browse3" ;
ON CHANGE( nFOLDERPOS := SetOption(oFld:nOption), ;
IIF( nFOLDERPOS = 1, BRWGRAD(oDlg,oFld), NIL ), ;
IIF( nFOLDERPOS = 2, BRWBMP(oDlg,oFld), NIL ), ;
IIF( nFOLDERPOS = 3, BRWCELL(oDlg,oFld), NIL ), oFld:Refresh() )
...
...
ACTIVATE DIALOG oDlg CENTERED NOWAIT ;
ON PAINT gradpaint2( hDC, oDlg ) ;
ON INIT ( oDlg:Move( 50 , 20, oDlg:nWidth, oDlg:nHeight, .f. ), ;
SetDialogsGradient( oFld ) )
RETURN ( NIL )
// ---------------------- FOLDER 1 --------------------
FUNCTION BRWGRAD(oDlg,oFld)
LOCAL oLbx3
// --- START - COLOR -------------------------------
oLbx3 := TXBrowse():New( oFld:aDialogs[1] )
oLbx3:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbx3:nColDividerStyle := LINESTYLE_BLACK
oLbx3:nRowDividerStyle := LINESTYLE_BLACK
oLbx3:nRecSelColor = 15512898
oLbx3:bClrSelFocus = { || { 16777215, 15512898 } }
oLbx3:bClrSel = { || { 16777215, 15512898 } }
...
...
oLbx3:CreateFromResource( 110 )
RETURN( NIL )
Any solution ?
Regards
Uwe