ds34 Posted February 12, 2009 Posted February 12, 2009 I have a progressbar embedded into a statusbar: CODE $StatusBar1 = _GUICtrlStatusBar_Create($Form1,-1,"", $SBARS_TOOLTIPS) Dim $StatusBar1_PartsWidth[3] = [50, 350, 460] _GUICtrlStatusBar_SetParts($StatusBar1, $StatusBar1_PartsWidth) _GUICtrlStatusBar_SetText($StatusBar1, "* ", 0) _GUICtrlStatusBar_SetTipText($StatusBar1,0,"Pause till next command is sent") _GUICtrlStatusBar_SetText($StatusBar1, " ", 1) _GUICtrlStatusBar_SetTipText($StatusBar1,1,"Next command to be sent") $statprogress = GUICtrlCreateProgress(0, 0, -1, -1, $PBS_SMOOTH,4) $hstatProgress = GUICtrlGetHandle($statprogress) _GUICtrlStatusBar_EmbedControl ($StatusBar1, 2, $hstatProgress) GUICtrlSetColor( $statprogress,0x0000FF) GUICtrlSetTip($statProgress,"Script progress indicator") Throughout my func I use a lot of call to set data (330msec updates) like: CODE _GUICtrlStatusBar_SetText($StatusBar1, Int(($MinTimeBetweenTL1Sends+$TL1SendQuePauseBeforeNextCommand-$timerdifference)/1000)&" sec ", 0) _GUICtrlStatusBar_SetText($StatusBar1, $TL1SendQue [1] [1]&" ", 1) GUICtrlSetColor( $statprogress,0x0000FF) GUICtrlSetTip($statProgress,"Script progress indicator") GUICtrlSetData($statprogress, 0) Sooner or later the progressbar size (w/o any [intentional] GUI resizing event) is changed: the progressbar occupies the complete statusbar area. I have no idea, what triggers this change, subsequently I tried to use CODE _GUICtrlStatusBar_SetParts($StatusBar1, $StatusBar1_PartsWidth) _GUICtrlStatusBar_Resize($StatusBar1) ;just to check if this repairs the oversized progress bar in order to reset the size, but it does not help. I tried as well with ControlMove to reseat the progressbar, but then the progressbar is gone completley. Anyone who suffered the same problem and has an idea? How to resize such embedded Progressbar (with ControlGetPos I can detect the change, so a subsequent Resize might be helpful) Thanks! Daniel
Zedna Posted March 13, 2009 Posted March 13, 2009 Your code seems to be OK. Simple reproducing script will be good for easy invoking this behaviour. Resources UDF ResourcesEx UDF AutoIt Forum Search
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now