MvGulik_old Posted April 30, 2005 Posted April 30, 2005 Is the $SS_SUNKEN style suppose to be changeable with GUICtrlSetStyle for label items.? (GUICtrlCreateLabel, GUICtrlCreatePic, GUICtrlCreateIcon) When I run the following code, using GUICtrlSetStyle with $SS_SUNKEN is having no effect. (top 2 are border less, bottom 2 are with border) AutoIt v3.1.1.0 Thanks. MvGulik #include <GuiConstants.au3> AutoItSetOption("GUIOnEventMode", 0) GUICreate("Sample", 220, 210, -1, -1) GUICtrlCreateLabel("Create: SS_SUNKEN OFF", 10, 10, 200, 40) GUICtrlCreateLabel("Create: SS_SUNKEN OFF,"&@LF&"SetStyle: SS_SUNKEN ON", 10, 60, 200, 40) GUICtrlSetStyle(-1, $SS_SUNKEN) GUICtrlCreateLabel("Create: SS_SUNKEN ON", 10, 110, 200, 40, $SS_SUNKEN) GUICtrlCreateLabel("Create: SS_SUNKEN ON,"&@LF&"SetStyle: SS_SUNKEN OFF", 10, 160, 200, 40, $SS_SUNKEN) GUICtrlSetStyle(-1, 0) GUISetState(@SW_SHOW) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE [Left The Building]
GaryFrost Posted April 30, 2005 Posted April 30, 2005 Might want to check the bug reports, and if you can't find anything on it, report the GUICtrlSetStyle is returning a 1, which means it was successful. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
MvGulik_old Posted April 30, 2005 Author Posted April 30, 2005 Did not found anything in the bug forum's. +GUICtrlSetStyle +SS_SUNKEN +GUICtrlSetStyle +SUNKEN @error [GUICtrlSetStyle:2] = 0 $RETURN [GUICtrlSetStyle:2] = 1 @error [GUICtrlSetStyle:4] = 0 $RETURN [GUICtrlSetStyle:4] = 1 ps: I'll leave bug reporting to others that are more comfortable with it. MvGulik #include <GuiConstants.au3> AutoItSetOption("GUIOnEventMode", 0) GUICreate("Sample", 250, 210, -1, -1) GUICtrlCreateLabel("Create: SS_SUNKEN OFF", 10, 10, 150, 40) GUICtrlCreateLabel("Create: SS_SUNKEN OFF," & @LF & "SetStyle: SS_SUNKEN ON", 10, 60, 150, 40) $RETURN = GUICtrlSetStyle(-1, $SS_SUNKEN) $ERROR = @error GUICtrlCreateLabel("GUICtrlSetStyle:"& @LF & "$RETURN = " & $RETURN & @LF & "@error = "&$ERROR, 170, 50, 90, 50) ConsoleWrite("@error [GUICtrlSetStyle:2] = " & $ERROR & @LF) ConsoleWrite("$RETURN [GUICtrlSetStyle:2] = " & $RETURN & @LF) GUICtrlCreateLabel("Create: SS_SUNKEN ON", 10, 110, 150, 40, $SS_SUNKEN) GUICtrlCreateLabel("Create: SS_SUNKEN ON," & @LF & "SetStyle: SS_SUNKEN OFF", 10, 160, 150, 40, $SS_SUNKEN) $RETURN = GUICtrlSetStyle(-1, 0) $ERROR = @error GUICtrlCreateLabel("GUICtrlSetStyle:"& @LF & "$RETURN = " & $RETURN & @LF & "@error = "&$ERROR, 170, 150, 90, 50) ConsoleWrite("@error [GUICtrlSetStyle:4] = " & $ERROR & @LF) ConsoleWrite("$RETURN [GUICtrlSetStyle:4] = " & $RETURN & @LF) GUISetState(@SW_SHOW) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE [Left The Building]
jpm Posted April 30, 2005 Posted April 30, 2005 Did not found anything in the bug forum's.+GUICtrlSetStyle +SS_SUNKEN+GUICtrlSetStyle +SUNKEN@error [GUICtrlSetStyle:2] = 0$RETURN [GUICtrlSetStyle:2] = 1@error [GUICtrlSetStyle:4] = 0$RETURN [GUICtrlSetStyle:4] = 1ps: I'll leave bug reporting to others that are more comfortable with it.MvGulik#include <GuiConstants.au3> AutoItSetOption("GUIOnEventMode", 0) GUICreate("Sample", 250, 210, -1, -1) GUICtrlCreateLabel("Create: SS_SUNKEN OFF", 10, 10, 150, 40) GUICtrlCreateLabel("Create: SS_SUNKEN OFF," & @LF & "SetStyle: SS_SUNKEN ON", 10, 60, 150, 40) $RETURN = GUICtrlSetStyle(-1, $SS_SUNKEN) $ERROR = @error GUICtrlCreateLabel("GUICtrlSetStyle:"& @LF & "$RETURN = " & $RETURN & @LF & "@error = "&$ERROR, 170, 50, 90, 50) ConsoleWrite("@error [GUICtrlSetStyle:2] = " & $ERROR & @LF) ConsoleWrite("$RETURN [GUICtrlSetStyle:2] = " & $RETURN & @LF) GUICtrlCreateLabel("Create: SS_SUNKEN ON", 10, 110, 150, 40, $SS_SUNKEN) GUICtrlCreateLabel("Create: SS_SUNKEN ON," & @LF & "SetStyle: SS_SUNKEN OFF", 10, 160, 150, 40, $SS_SUNKEN) $RETURN = GUICtrlSetStyle(-1, 0) $ERROR = @error GUICtrlCreateLabel("GUICtrlSetStyle:"& @LF & "$RETURN = " & $RETURN & @LF & "@error = "&$ERROR, 170, 150, 90, 50) ConsoleWrite("@error [GUICtrlSetStyle:4] = " & $ERROR & @LF) ConsoleWrite("$RETURN [GUICtrlSetStyle:4] = " & $RETURN & @LF) GUISetState(@SW_SHOW) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE<{POST_SNAPBACK}>I will have a look to explain what happening
jpm Posted April 30, 2005 Posted April 30, 2005 in fact when you create with SS_SUNKEN Windows is adding with the SS_SUNKEN style the extended style WS_EX_STATICEDGE. So I cannot do all what Windows is doing without having specify it. You need a WinSpy to debug such pb. I will ask JON to add the (ex)styles in the AutoIt info tools. Thanks for your comprehension.
MvGulik_old Posted May 1, 2005 Author Posted May 1, 2005 No problem. Thanks for looking into it. [Left The Building]
quaizywabbit Posted May 1, 2005 Posted May 1, 2005 In the mean-time you can use Winspector (link to download site below in my Signature) to aid debugging. It has Style and Exstyle viewing and editing capabilities built in. I love it!!! [u]Do more with pre-existing apps![/u]ANYGUIv2.8
jpm Posted May 1, 2005 Posted May 1, 2005 If you have use the search on the autoit forums with "winspy" you could have found a post like this
quaizywabbit Posted May 1, 2005 Posted May 1, 2005 Thanks Jpm, I like the layout of that one better(less cluttered!) [u]Do more with pre-existing apps![/u]ANYGUIv2.8
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