!!! Moved to http://ahkscript.org....php?f=6&t=2197 !!!
Edited by just me, 15 February 2014 - 06:43 AM.
!!! Moved to http://ahkscript.org....php?f=6&t=2197 !!!
Edited by just me, 15 February 2014 - 06:43 AM.
Hello just me,
can you tell me why it does not work with my code?
Here is my code:
#Persistent #SingleInstance force SetBatchLines, -1 #NoEnv #Include Class_CTLCOLORS.ahk xPos := 12 yPos := 10 Loop, 7 { Gui, Add, Text, x%xPos% y%yPos% w20 h10 border HWNDh_A%A_Index% vA%A_Index% gCallColor 0x0100, Gui, Add, Text, xp+22 yp w20 h10 border HWNDh_B%A_Index% vB%A_Index% gCallColor 0x0100, Gui, Add, Text, xp+22 yp w20 h10 border HWNDh_C%A_Index% vC%A_Index% gCallColor 0x0100, Gui, Add, Text, xp+22 yp w20 h10 border HWNDh_D%A_Index% vD%A_Index% gCallColor 0x0100, Gui, Add, Text, xp+22 yp w20 h10 border HWNDh_E%A_Index% vE%A_Index% gCallColor 0x0100, Gui, Add, Text, xp+22 yp w20 h10 border HWNDh_F%A_Index% vF%A_Index% gCallColor 0x0100, Gui, Add, Text, xp+22 yp w20 h10 border HWNDh_G%A_Index% vG%A_Index% gCallColor 0x0100, Gui, Add, Text, xp+22 yp w20 h10 border HWNDh_H%A_Index% vH%A_Index% gCallColor 0x0100, Gui, Add, Text, xp+22 yp w20 h10 border HWNDh_I%A_Index% vI%A_Index% gCallColor 0x0100, if (A_Index = 2 || A_Index = 3 || A_Index = 4 || A_Index = 5 || A_Index = 6 || A_Index = 7) yPos+=12 } CTLCOLORS.Attach(h_A1, "FF8080", "FFFFFF") Gui, Add, Radio, x222 y10 w100 h20 checked, Hintergrundfarbe Gui, Add, Radio, x222 y30 w100 h20 , Textfarbe Gui, Add, Text, x12 y92 w120 h20 , Eigener HEX Farbcode: Gui, Add, Edit, x132 y91 w50 h18 HWNDDEDE1, CTLCOLORS.Attach(DEDE1, "FF8080", "FFFFFF") Gui, Show, x746 y244 h379 w361, Return GuiSize: If (A_EventInfo != 1) { Gui, %A_Gui%:+LastFound WinSet, ReDraw } Return CallColor: Helper := A_GuiControl msgbox %Helper% Return GuiClose: ExitApp
Yes, because control A2 is painted on A1 (you do not increase yPos after the first iteration of your loop).
Prefer ahkscript.org for the time being.
; Function: Helper object to color controls on WM_CTLCOLOR... notifications. ; Supported controls are: Checkbox, ComboBox, DropDownList, Edit, ListBox, Radio, Text. ; Checkboxes and Radios accept background colors only due to design.
This class does not support pushbuttons.
Prefer ahkscript.org for the time being.