Hi,
ich hätte mal wieder eine Frage,
und zwar versuch ich Minesweeper nachzubauen.
Eine Funktion im Script sieht im Moment so aus:
[autoit]Func _CreateField($Slots = 10, $Rows = 10, $Mines = 10)
Dim $Fields_Label[$Rows][$Slots], $Fields_Picture[$Rows][$Slots]
For $i1 = 0 To $Rows -1 Step 1
For $i2 = 0 To $Slots -1 Step 1
$Fields_Label[$i1][$i2] = 0
Next
Next
$x = 0
$y = 100
For $i1 = 0 To $Rows -1 Step 1
For $i2 = 0 To $Slots -1 Step 1
$Fields_Label[$i1][$i2] = GUICtrlCreateLabel("hi", $x, $y,50,50)
GUICtrlSetState(-1,$GUI_DISABLE)
$x += 51
Next
$x = 0
$y += 51
Next
$x = 0
$y = 100
For $i1 = 0 To $Rows -1 Step 1
For $i2 = 0 To $Slots -1 Step 1
$Fields_Picture[$i1][$i2] = GUICtrlCreatePic("Test.JPG", $x, $y,50,50)
GUICtrlSetState(-1,$GUI_DISABLE)
GUICtrlSetOnEvent(-1,"_ButtonPressed")
GUICtrlSetState(-1,$GUI_ENABLE)
$x += 51
Next
$x = 0
$y += 51
Next
EndFunc
Ergebnis:
- Das Bild liegt über dem Label
- Das Bild lässt sich anklicken und verschwindet dann (in ner anderen Funktion)
- Man sieht nichts mehr vom Label darunter
Allerdings ist jetzt das Label das darunter liegt deaktiviert, also so gräulich geschrieben ![]()