by ukoenig » Wed May 17, 2017 6:35 am
I added this solution to the sample-collector.
It saves a lot of time ( just 5 minutes ) because no defines of windows, dialogs or folders is needed.
Just include the code to any of the group-sections of window, dialog or folder.
I counted round about > 100 tests could be added.
- Code: Select all Expand view
// -------------------------------------------------------------------- SECTION 1 Page 1 - 4
FUNCTION SS1_PART1( oFld1, nSavePage ) // 1. Page and 2. sample
LOCAL aBitmaps1
...
...
// ------------------- 2. sample
@ 155,10 XBROWSE oBrw[2] OF oFld1:aDialogs[1] ;
SIZE -10, 123 PIXEL ;
COLUMNS 'FIRST', "LAST", 'HIREDATE', 'MARRIED', 'SALARY' ;
ALIAS 'CUST' LINES NOBORDER AUTOSORT FONT oFont
oBrw[2]:Married:SetCheck() // Default FWH Bitmap is Alpha
WITH OBJECT oBrw[2]
:bRClickHeaders := { || XBRCOLSELECTOR( oBrw[2] ) } // added !!!!
:nStretchCol := 1
:nMarqueeStyle := 4
:lHScroll := .F.
:bClrStd := { || If( oBrw[2]:KeyNo() % 2 == 0, ;
{ If( ( oBrw[2]:cAlias )->( Deleted() ), 255, CLR_BLACK ), nRGB( 181, 255, 218 ) }, ;
{ If( ( oBrw[2]:cAlias )->( Deleted() ), 255, CLR_BLACK ), nRGB( 175, 255, 255 ) } ) }
:bClrSel := ;
:bClrSelFocus := { || { If( ( oBrw[2]:cAlias )->( Deleted() ), 255, CLR_BLACK ), RGB( 255, 233, 162 ) } }
:lFooter := .T.
:AutoFit()
WITH OBJECT :First
:AddBitmap( c_Path1 + 'open2.bmp' ) // non-alpha bitmap
:AddBmpFile( c_Path1 + "Sort.bmp" )
:bBmpData := { || 1 }
:nHeadBmpNo := 2
END
WITH OBJECT :Last
:AddBmpFile( c_Path1 + "Sort.bmp" )
:nHeadBmpNo := 1
END
WITH OBJECT :HireDate
:AddBitmap( c_Path1 + 'task.bmp' ) // alpha
:AddBmpFile( c_Path1 + "Sort.bmp" )
:bBmpData := { || 1 }
:nHeadBmpNo := 2
END
WITH OBJECT :Married
:AddBmpFile( c_Path1 + "Sort.bmp" )
:nHeadBmpNo := 1
END
WITH OBJECT :Salary
:AddBmpFile( c_Path1 + "Sort.bmp" )
:nHeadBmpNo := 1
END
END
oBrw[2]:aCols[ 2 ]:bClrStd := {|| { CLR_HRED, 14540253 } }
oBrw[2]:CreateFromCode()
@ 280,20 SAY oBrw[2]:oSeek PROMPT oBrw[2]:cSeek SIZE 50,10 PIXEL BORDER ;
OF oFld1:aDialogs[1] COLOR CLR_BLACK,CLR_YELLOW PICTURE '@!'
RETURN NIL
regards
Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.