Dialog controls are flickering when resized..

Re: Dialog controls are flickering when resized..

Postby nageswaragunupudi » Wed Jun 20, 2018 8:05 am

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?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10662
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Dialog controls are flickering when resized..

Postby fraxzi » Wed Jun 20, 2018 8:27 am

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:
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: Dialog controls are flickering when resized..

Postby nageswaragunupudi » Wed Jun 20, 2018 8:37 am

Please let me see a sample. You may send to my mail and give me some time.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10662
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Dialog controls are flickering when resized..

Postby fraxzi » Wed Jun 20, 2018 8:59 am

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:
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: Dialog controls are flickering when resized..

Postby Rick Lipkin » Wed Jun 20, 2018 1:28 pm

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 view  RUN

#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 view  RUN

      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 view  RUN

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

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

Return(nil)
 


Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 51 guests