fraxzi wrote:Dear All,
As with the above..
When I resize Dialog controls are flickering with backround gradient..
DEFINE DIALOG oDlg TRANSPARENT
...standard controls here.. say, get, folder, xbrowse...
oDlg:SetBrush( TBrush():New() )
ACTIVATE DIALOG oDlg NOWAIT;
ON PAINT uDialogGradient( hDC, oDlg, { { 1, RGB( 216, 230, 238 ), RGB( 103, 154, 194 ) } }, .F. )
....
FUNCTION uDialogGradient( hDC, oDlg, aGrad, lPos )
GradientFill( hDC, 0, 0, oDlg:nHeight, oDlg:nWidth, aGrad, lPos )
ReleaseDC( hDC )
RETURN NIL
Any thoughts?
Regards,
Frances
First, let us handle the case of simple dialog.
Please run this sample. Try resizing the dialog and you will not find any flickering.
#include "fivewin.ch"
function Main()
local oDlg, oBrw, oFont, oBrush
local aGet[ 3 ], aVar := { "Hello World ", 2345678, Date() }
USE CUSTOMER
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE BRUSH oBrush GRADIENT { { 1, RGB( 216, 230, 238 ), RGB( 103, 154, 194 ) } }
DEFINE DIALOG oDlg SIZE 800,600 PIXEL TRUEPIXEL FONT oFont BRUSH oBrush TRANSPARENT RESIZABLE
@ 20,20 GROUP TO 180,400 PIXEL OF oDlg
@ 40,40 SAY "Try Resizing this Dialog" SIZE 300,20 PIXEL OF oDlg
@ 70,40 GET aGet[ 1 ] VAR aVar[ 1 ] SIZE 300,24 PIXEL OF oDlg
@ 110,40 GET aGet[ 2 ] VAR aVar[ 2 ] SIZE 100,24 PIXEL OF oDlg
@ 140,40 GET aGet[ 3 ] VAR aVar[ 3 ] SIZE 100,24 PIXEL OF oDlg
@ 200,40 XBROWSE oBrw SIZE 400,200 PIXEL OF oDlg DATASOURCE "CUSTOMER" ;
AUTOCOLS CELL LINES NOBORDER
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
RELEASE BRUSH oBrush
return nil
Please let me know if you experience any flickering while resizing.