Jump to content

Recommended Posts

Posted

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]

Posted

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]

Posted

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

<{POST_SNAPBACK}>

I will have a look to explain what happening :(
Posted

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.

Posted

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

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
  • Recently Browsing   0 members

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