Hintergrund von Radiobutton unsichtbar machen

  • Hallo, hab folgendes Problem:

    Hab hab auf meiner Gui ein Bild liegen und möchte darauf nun einen Radiobutton setzen. Aber da kommt immer so ein hässlicher Rand um den Button, kann ich den irgendwie wegbekommen? Mit GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) gehts leider nicht.
    Hoffe ihr könnt mir helfen.

    Edrahil

  • Probiers mal so:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>

    [/autoit] [autoit][/autoit] [autoit]

    GUICreate("My GUI radio", 200, 200) ; will create a dialog box that when displayed is centered
    GUICtrlCreatePic('Bild.jpg', 0, -200, 200, 400, 0)

    [/autoit] [autoit][/autoit] [autoit]

    $radio1 = GUICtrlCreateRadio("", 10, 10, 15, 15)
    GUICtrlCreateLabel('Radio 1', 30, 10, 100, 20)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    $radio2 = GUICtrlCreateRadio("", 10, 40, 15, 15)
    GUICtrlCreateLabel('Radio 2', 30, 40, 100, 20)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    GUICtrlSetState($radio2, $GUI_CHECKED)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState() ; will display an dialog box with 1 checkbox

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    ExitLoop
    Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED
    ;~ MsgBox(64, 'Info:', 'You clicked the Radio 1 and it is Checked.')
    Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED
    ;~ MsgBox(64, 'Info:', 'You clicked on Radio 2 and it is Checked.')
    EndSelect
    WEnd

    [/autoit]
  • Hallo und herzlich willkommen Silverhawk,

    ich verstehe Dein Problem und möchte Dir eine Alternative anbieten:

    Spoiler anzeigen
    [autoit]


    #include <GUIConstantsEx.au3>
    #include <ButtonConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    GUICreate("My GUI radio", 202, 80)
    GUICtrlCreatePic('Bild.jpg', 0, 0, 202, 80, 0)

    [/autoit] [autoit][/autoit] [autoit]

    $radio1 = GUICtrlCreateRadio("Radio1", 10, 10, 75, 22, $BS_PUSHLIKE)
    $radio2 = GUICtrlCreateRadio("Radio2", 10, 40, 75, 22, $BS_PUSHLIKE)
    GUICtrlSetState($radio2, $GUI_CHECKED)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetState()

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    ExitLoop
    Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED

    [/autoit] [autoit][/autoit] [autoit]

    Case $msg = $radio2 And BitAND(GUICtrlRead($radio2), $GUI_CHECKED) = $GUI_CHECKED

    [/autoit] [autoit][/autoit] [autoit]

    EndSelect
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    ; Ende

    [/autoit]


    Viel Erfolg ! :)

  • Jo thx, das funzt super, besser als die Kanten aber gibt es keine andere Möglichkeit die Kanten der normalen Radioboxen zu umgehen?