Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #10090
| From | Franz Rachbauer <office@rachbauer.org> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: I want to change Iconpushbuttons:usecolor in a for-next loop....how? |
| Date | 2016-12-29 09:20 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <o42gvi$1e3c$1@gioia.aioe.org> (permalink) |
| References | <_PW8A.209120$Xi4.69838@fx19.fr7> |
Hi Raymond,
i'm using the buttons directly to do this color change:
METHOD PostInit() CLASS MyDataWindow
LOCAL aC := SELF:GetControls() AS ARRAY
LOCAL x AS DWORD
FOR x := 1 TO ALen(aC)
aC[x]:Background := Brush{Color{255, 100, 10}}
NEXT
RETURN SELF
METHOD GetControls() CLASS MyDataWindow
LOCAL aControls AS ARRAY
LOCAL oC AS VObject
LOCAL hWnd AS PTR
hWnd := GetWindow( SELF:oSurface:Handle(), GW_CHILD )
aControls := {}
WHILE hWnd != NULL_PTR
oC := GetObjectByHandle( hWnd )
IF IsInstanceOfUsual( oC, #BUTTON )
AAdd( aControls, oC )
ENDIF
hWnd := GetWindow( hWnd, GW_HWNDNEXT )
ENDDO
RETURN aControls
Regards, Franz
Am 28.12.2016 um 23:15 schrieb Raymond Steffensen:
> Hi
>
> Vo has been in the drawer for quite a few years, and now I start to
> scratch the surface again.
>
> I have 34 push buttons I want to change background color on, and I found
> the iconpushbuttons LIB
> There I can use the following:
>
> oCCButton1:Usecolor := Brush{Color{COLORGREEN},HATCHSOLID}
>
> I would like to do this in a for-next loop, but only get errors.
>
> FOR i := 1 to 34
> IVarGetSelf(self,String2Symbol('oCCButton'+AsString(i):Usecolor)) :=
> Brush{Color{COLORGREEN},HATCHSOLID}
>
> NEXT i
>
> What am I doing wrong?
>
> Regards
> Speedy
Back to comp.lang.clipper.visual-objects | Previous | Next — Next in thread | Find similar | Unroll thread
Re: I want to change Iconpushbuttons:usecolor in a for-next loop....how? Franz Rachbauer <office@rachbauer.org> - 2016-12-29 09:20 +0100
Re: I want to change Iconpushbuttons:usecolor in a for-next loop....how? "Raymond Steffensen" <raymond@up2ng.net> - 2016-12-29 13:18 +0100
Re: I want to change Iconpushbuttons:usecolor in a for-next loop....how? Franz Rachbauer <office@rachbauer.org> - 2016-12-29 14:59 +0100
csiph-web