Page 3 of 3

Re: Dialog controls are flickering when resized..

Posted: Wed Jun 20, 2018 8:05 am
by nageswaragunupudi
When you redefine Groupbox, please try adding TRANSPARENT.
I did not get flickering when I used clause TRANSPARENT.

I see xbrowse on the folderex is also flickering,

May I also ask if you get rid of flickering if you totally avoid groupboxes?

Re: Dialog controls are flickering when resized..

Posted: Wed Jun 20, 2018 8:27 am
by fraxzi
nageswaragunupudi wrote:When you redefine Groupbox, please try adding TRANSPARENT.
I did not get flickering when I used clause TRANSPARENT.

I see xbrowse on the folderex is also flickering,

May I also ask if you get rid of flickering if you totally avoid groupboxes?



Mr. Rao,

I tried some combination.. Even if I put Transparent Clause on my REDEFINE or in .RC or Both.. Still Flickers.

If I remove GroupBoxes, SAYs and GETs not flickering.. but for design consideration groupbox must be display ..

yes, xBrowse flickers within FolderEx even oFldEx:aDialog[ 1 ]:oClient := oBrw was declared.. FolderEx will add-up tabs along with the development.

:idea:

Re: Dialog controls are flickering when resized..

Posted: Wed Jun 20, 2018 8:37 am
by nageswaragunupudi
Please let me see a sample. You may send to my mail and give me some time.

Re: Dialog controls are flickering when resized..

Posted: Wed Jun 20, 2018 8:59 am
by fraxzi
nageswaragunupudi wrote:Please let me see a sample. You may send to my mail and give me some time.



Hi Mr. Rao,

email Sent subject: "WorkingProject_RAO"

:wink:

Re: Dialog controls are flickering when resized..

Posted: Wed Jun 20, 2018 1:28 pm
by Rick Lipkin
Rao

I posted a question on how to get the control array for window and dialog objects because I selectively resize major controls in my programs .. I took your sample solution on how to generically resize your controls and noticed when I compiled the program .. the resize was very 'choppy' .. here is your sample and link to my thread:

viewtopic.php?f=3&t=35739

Code: Select all | Expand


#include "fivewin.ch"

function Main()

   local oWnd, oBar

   DEFINE WINDOW oWnd MDI
   DEFINE BUTTONBAR oBar OF oWnd SIZE 100,32 2007
   DEFINE BUTTON OF oBar PROMPT "Child Browse" CENTER ACTION ChildBrowse()
   ACTIVATE WINDOW oWnd MAXIMIZED

return nil

//----------------------------------------------------------------------------//

static function ChildBrowse()

   local oWnd, oFld, oBar, oBrw, cAlias, oFont

   USE CUSTOMER NEW SHARED ALIAS ( cAlias := cGetNewAlias( "CUST" ) )

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,14
   DEFINE WINDOW oWnd MDICHILD OF WndMain() TITLE "Title"
   oWnd:SetFont( oFont )

   DEFINE BUTTONBAR oBar OF oWnd 2007
   SET MESSAGE OF oWnd TO "" 2007

   @ 0,0 FOLDEREX oFld SIZE 1000,900 PIXEL OF oWnd PROMPTS "Personal", "Second" BOTTOM ADJUST OPTION 1

   @ 20, 60 XBROWSE oBrw SIZE -28,-300 PIXEL OF oFld:aDialogs[ 1 ] ;
      DATASOURCE cAlias AUTOCOLS CELL LINES NOBORDER

   oBrw:CreateFromCode()

   oWnd:aMinMaxInfo := { nil, nil, nil, nil, 200, 500, nil, nil }

   oWnd:bPostEnd  := { ||  ( cAlias )->( DBCLOSEAREA() ), ;
                           oFont:End() }

   ACTIVATE WINDOW oWnd

return nil

//----------------------------------------------------------------------------//
 


I finally figured out the control object in my thread .. and as I resize my ( selective ) controls .. the movement of the controls are smooth and seamless .. here is where I am resizing a mdichild with tfolderx and a dialog with xBrowse ..

Code: Select all | Expand


      BlueGreenGrad()     
      ....
      ....

      ACTIVATE DIALOG oPersonal NOWAIT    ;
              ON INIT( oPersonal:Move(0,0));
           VALID(!GETKEYSTATE( 27 ))

ACTIVATE WINDOW oWndChildA ;
         ON PAINT ( If( nSCR1 < 1280, _ResMessage(nSCR1, nSCR2, @nTimes, oLbxA, oLbxB, oLbxC, oFld ), ));
         ON INIT (oWndChildA:bResized := {|| _ReSizeUm( oPersonal,oWndChildA,oLbxA,oFld ) }, ;
           oPersonal:refresh(.t.),oLbxA:SetFocus());
         VALID ( IIF( !lOK, _CloseRes(.T.,oFontB, oRsPort, oLbxA, @lOk, oWndChildA ),.F. ))

//-----------------------------------
Static Func _ReSizeUm( oPersonal, oWndChildA,oLbxA,oFld )

oPersonal:SetSize( oWndChildA:nWidth, oWndChildA:nHeight, .t. ) // frame and dialog link

// dialog controls
oPersonal:bResized = { | nSizeType, nWidth, nHeight | _ResizeControls( nSizeType, nWidth, nHeight, oPersonal,oFld )  }

Return(nil)

//-------------------------
Static Func _ResizeControls( nSizeType, nWidth, nHeight, oPersonal, oFld )

*xbrowse( oPersonal:aControls )
*xbrowse( oFld:aDialogs[1]:aControls )


if nSizeType = 0 //SIZE_MAXIMIZED

   oPersonal:aControls[ 1 ]:SetSize( nWidth - 20,  nHeight - 50 ) // folder
                                             
   oFld:aDialogs[1]:aControls[1]:SetSize( nWidth - 100 , nHeight - 100 )   // xbrowse
                                       
   oFld:aDialogs[1]:SetSize(     nWidth - 5, nHeight - 80 ) // dialog frame

endif

Return(nil)
 


Don't know if the flicker has anything to do with the PIXEL clause ? .. one last thing about transparent .. I do use the SetDlgGradient() that forces transparency system wide.

Code: Select all | Expand


//---------------------------
Func BlueGreenGrad()

Local xGrad4 :=  {{ 1.00,14671839,   7419904 }, { 1.00,7419904,  14671839 }}   // med blue
SetDlgGradient( xGrad4 )

Return(nil)
 


Rick Lipkin