Jump to content
Sign in to follow this  
Armand

GUICtrlSetImage() is moving my icons ?!

Recommended Posts

hey there, is there any possible reason why would the following script move an icon control between the MSGBoxes ?!

;.....................
If @Compiled = 0 Then
    $RatingICON1 = GUICtrlCreateIcon($IconList[75], 0, 966 - 128, $DescriptionMinMax[0] + 12, 16, 16, BitOR($SS_NOTIFY, $WS_GROUP))
Else
    $RatingICON1 = GUICtrlCreateIcon(@ScriptFullPath, $IconList[75], 966 - 128, $DescriptionMinMax[0] + 12, 16, 16, BitOR($SS_NOTIFY, $WS_GROUP))
EndIf
GUICtrlSetTip(-1, "Rate this download with 1 star!")
If @Compiled = 0 Then
    $RatingICON2 = GUICtrlCreateIcon($IconList[75], 0, 966 - 110, $DescriptionMinMax[0] + 12, 16, 16, BitOR($SS_NOTIFY, $WS_GROUP))
Else
    $RatingICON2 = GUICtrlCreateIcon(@ScriptFullPath, $IconList[75], 966 - 110, $DescriptionMinMax[0] + 12, 16, 16, BitOR($SS_NOTIFY, $WS_GROUP))
EndIf
GUICtrlSetTip(-1, "Rate this download with 2 stars!")
If @Compiled = 0 Then
    $RatingICON3 = GUICtrlCreateIcon($IconList[75], 0, 966 - 92, $DescriptionMinMax[0] + 12, 16, 16, BitOR($SS_NOTIFY, $WS_GROUP))
Else
    $RatingICON3 = GUICtrlCreateIcon(@ScriptFullPath, $IconList[75], 966 - 92, $DescriptionMinMax[0] + 12, 16, 16, BitOR($SS_NOTIFY, $WS_GROUP))
EndIf
GUICtrlSetTip(-1, "Rate this download with 3 stars!")
If @Compiled = 0 Then
    $RatingICON4 = GUICtrlCreateIcon($IconList[75], 0, 966 - 74, $DescriptionMinMax[0] + 12, 16, 16, BitOR($SS_NOTIFY, $WS_GROUP))
Else
    $RatingICON4 = GUICtrlCreateIcon(@ScriptFullPath, $IconList[75], 966 - 74, $DescriptionMinMax[0] + 12, 16, 16, BitOR($SS_NOTIFY, $WS_GROUP))
EndIf
GUICtrlSetTip(-1, "Rate this download with 4 stars!")
If @Compiled = 0 Then
    $RatingICON5 = GUICtrlCreateIcon($IconList[75], 0, 966 - 56, $DescriptionMinMax[0] + 12, 16, 16, BitOR($SS_NOTIFY, $WS_GROUP))
Else
    $RatingICON5 = GUICtrlCreateIcon(@ScriptFullPath, $IconList[75], 966 - 56, $DescriptionMinMax[0] + 12, 16, 16, BitOR($SS_NOTIFY, $WS_GROUP))
EndIf
GUICtrlSetTip(-1, "Rate this download with 5 stars!")

;...............

    For $i = 1 To 5
        $control = Eval("RatingICON" & String($i)) ; that way we get the needed control.
        ;$cmtedtpos = ControlGetPos($ElephantMainGUI, "", $control)
        MsgBox(0, "Before", "B")
        If $i > $Rate Then
            ;; Set the uncolored star.
            If @Compiled = 0 Then
                GUICtrlSetImage($control, $IconList[75])
            Else
                GUICtrlSetImage($control, @ScriptFullPath, $IconList[75])
            EndIf
        Else
            ;; Set the colored star.
            If @Compiled = 0 Then
                GUICtrlSetImage($control, $IconList[86])
            Else
                GUICtrlSetImage($control, @ScriptFullPath, $IconList[86])
            EndIf
        EndIf
        MsgBox(0, "After", "A")
        ;GUICtrlSetPos($control, $cmtedtpos[0], $cmtedtpos[1])
    Next

Share this post


Link to post
Share on other sites

well... no one ?

PS. as you can see i've found a by-pass for this issue, i just uncomment these connected lines above and it works, but then it looks like the buttons are jumping up and down while updating them...

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...