Dear Mr. Antonio,
In my recent sample above.. SAY, GET and GROUPBOX are flickering.
It is strange.
Regards,
Frances
fraxzi wrote:Dear All,
As with the above..
When I resize Dialog controls are flickering with backround gradient..
- Code: Select all Expand view
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
#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
#include "fivewin.ch"
function Main()
local oWnd, oBar
DEFINE WINDOW oWnd MDI
DEFINE BUTTONBAR oBar of oWnd 2007
DEFINE BUTTON OF oBar ACTION DialogOnMDIChild()
ACTIVATE WINDOW oWnd MAXIMIZED
return nil
function DialogOnMDIChild()
local oWnd, oDlg, oBrush, oFont, oGet
local cGet := 'themed apps'
DEFINE BRUSH oBrush GRADIENT { { 1, RGB( 216, 230, 238 ), RGB( 103, 154, 194 ) } }
DEFINE WINDOW oWnd MDICHILD OF WndMain() BRUSH oBrush
RELEASE BRUSH oBrush
ACTIVATE WINDOW oWnd ON INIT BuildDialog( oWnd )
return nil
function BuildDialog( oWnd )
local oDlg, oFont, oGet
local cGet := "Hello World "
DEFINE FONT oFont NAME "Verdana" SIZE 0, -16
DEFINE DIALOG oDlg RESOURCE 'DLG_CONTENT' OF oWnd FONT oFont
RELEASE FONT oFont
// REDEFINE GROUP ID 1001 OF oDlg TRANSPARENT
REDEFINE SAY ID 1003 OF oDlg TRANSPARENT
REDEFINE SAY ID 1004 OF oDlg TRANSPARENT
REDEFINE GET oGet VAR cGet ID 1002 OF oDlg UPDATE
ACTIVATE DIALOG oDlg NOWAIT ON INIT ( ChangeParent( oDlg, oWnd ) )
oDlg:End()
return nil
function ChangeParent( oDlg, oWnd )
local n
for n = 1 to Len( oDlg:aControls )
SetParent( oDlg:aControls[ n ]:hWnd, oWnd:hWnd )
AAdd( oWnd:aControls, oDlg:aControls[ n ] )
oDlg:aControls[ n ]:oWnd = oWnd
next
return nil
Otto wrote:Hello Frances,
can you try to remove manifest for testing purpose.
Is it still flickering.
Thank you and best regards,
Otto
First, let us handle the case of simple dialog.
Please run this sample. Try resizing the dialog and you will not find any flickering.
- Code: Select all Expand view
#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.
nageswaragunupudi wrote:I prepared MDI sample based on the rc file you posted. Flickering, if any, is negligible.
1) If you find massive flickering, please post a sample rc file.
2) If you say there is flickering in 18.04 but there was no flickering with an earlier version, please indicate the version number.
I have one question. Why should we use a dialog from resource to build a mdichild window? Why can we not use the dialog itself directly? In what way a nomodal dialog different from mdichild in functionality?
nageswaragunupudi wrote:I did not find any flickering with Groupbox. The only issue I found was that the transparency does not work correctly on gradient and image brushes, when resized.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 40 guests