I am re-sizing a dialog and am using the SetGradient() function to color my dialog box. When I re-size the dialog .. the gradient just tiles itself ( repeats ) and does not flow with the resize. Any suggestions .. here is the code
Rick Lipkin
- Code: Select all Expand view RUN
LightYellow()
DEFINE DIALOG oDlg RESOURCE "TRANSACT";
TITLE "TRANSACTION History for INVENTORY RECORD "+ltrim(str(nInventEid))
REDEFINE xBROWSE oLbx ;
ID 111 of oDlg ;
RECORDSET oRsTran ;
COLUMNS "HISTORY", ;
"ENTRYBY", ;
"TABLENAME", ;
"INVENTEID" ;
COLSIZES 370,90,90,110 ;
HEADERS "History", ;
"EntryBy", ;
"Table", ;
"InventEid" ;
AUTOSORT AUTOCOLS LINES CELL
ADD oCol TO oLbx AT 2 DATA {|x| x := If ( oRsTran:Eof, ,_ChkDate(oRsTran:Fields("EntryDate"):Value)) } HEADER "Date"
oLbx:aCols[2]:nDataStrAlign := AL_LEFT // date
oLbx:aCols[2]:nHeadStrAlign := AL_LEFT
WITH OBJECT oLbx
:lTabLikeExcel := .t.
END
oLbx:lRecordSelector := .f.
oLbx:lFooter := .t.
oCol := oLbx:aCols[ 1 ]
oCol:bFooter := { || Ltrim( Str( oLbx:KeyNo() ) ) + " / " + LTrim( Str( oLbx:KeyCount() ) ) }
oLbx:bChange := { || oCol:RefreshFooter() }
oLbx:nStretchCol := 1
REDEFINE BTNBMP oBtn1 ID 112 OF oDlg ;
RESOURCE "OK", "DOK", "DOK" ;
PROMPT "&Ok" LEFT 2007;
ACTION ( oDLG:END() ) ;
REDEFINE BTNBMP oBtn2 ID 113 OF oDlg ;
RESOURCE "MINUS16", "DMINUS16", "DMINUS16" ;
PROMPT "&Del" LEFT 2007;
ACTION ( _DelUm( oRsTran, oLbx ) )
oDlg:bResized = { | nSizeType, nWidth, nHeight | ResizeControls( nSizeType, nWidth, nHeight, oDlg )}
ACTIVATE DIALOG oDlg ;
ON INIT( oLbx:SetFocus(), IF( (xSUPER = 'Y' .or. xAdmin = "Y"), , oBtn2:Hide() ));
VALID(!GETKEYSTATE( 27 ))
//-------------------------
Static Func ResizeControls( nSizeType, nWidth, nHeight, oDlg )
if nSizeType = 0 //SIZE_MAXIMIZED
oDlg:aControls[ 1 ]:SetSize( nWidth - 60, nHeight - 10 ) //txbrowse
endif
Return(nil)
//-----------------
Static Func LightYellow()
SetDlgGradient( { { 0.01,8440801,16777215 },{ 0.75,16777215,8440801 } })
Return(nil)