Jump to content

@SW_LOCK/UNLOCK causes flicker


Recommended Posts

I'm using the @SW_LOCK/UNLOCK feature to basically freeze a few controls of my gui until all the data is set to print and then unlock it so updated data doesn't "scroll" while printing. The problem is it causes the whole gui to flicker/flash (basically all the controls disappear for a split second, which I find kind of annoying). Is there a workaround? Can I just lock the specific controls?

Link to comment
Share on other sites

I'm sorry, I know about the disable/enable, I guess I overstated/understated my needs/issues and what I'm looking for as the outcome. I kind of still want to freeze the GUI and not individual controls because even when you freeze the controls, it still scrolls through the controls while you reenable them (so one control updates at a time). I was using the disable/enable feature before I moved onto freezing the whole gui. So let me retract the need to freeze individual controls and ask is there a way to freeze the whole window without causing the flicker.

Link to comment
Share on other sites

  • 4 weeks later...

i still dont understand this very clearly, could somebody help me, im aware of macros just unsure how to impliment them.

if i'm going update 8-10 different labels. every 500ms, which order do i cast these in,

GUISetState(@SW_SHOW)

loop starts

GUISetState(@SW_DISABLE)

GUISetState(@SW_LOCK)

i dont see how GUICtrlSetState($Control, $GUI_DISABLE) would make any difference casting at this point?

+ i dont want to grey out the text anyway?

-update labels but check first to see if the data has changed (*)

GUISetState(@SW_UNLOCK)

GUISetState(@SW_DISABLE)

loop ends

when i use GUISetState(@SW_LOCK/UN_LOCK) the whole GUI flickers, what am i doing wrong here?

(*) i havent implemented this in my tests just yet.

perhaps i should

"try without the @SW_LOCK and @SW_UNLOCK. use ControlSetText, instead of GUICtrlSetData, Check Data is different before updating"

Edit: i made an absolute noob mistake of leaving a few extra guictrlsetdata() in where they shouldnt have been and it turns out these were the cause of the flicker, *slaps him self in the face*. in the end all i used out the above methods, was a simple check data is different before updating.

Edited by laffo16
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...