Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #10094 > unrolled thread
| Started by | "Raymond Steffensen" <raymond@up2ng.net> |
|---|---|
| First post | 2016-12-28 23:15 +0100 |
| Last post | 2016-12-28 18:25 -0500 |
| Articles | 5 — 5 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
I want to change Iconpushbuttons:usecolor in a for-next loop....how? "Raymond Steffensen" <raymond@up2ng.net> - 2016-12-28 23:15 +0100
Re: I want to change Iconpushbuttons:usecolor in a for-next loop....how? "Karl-Heinz" <invalid@invalid.invalid> - 2016-12-29 18:01 +0100
Re: I want to change Iconpushbuttons:usecolor in a for-next loop....how? D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2016-12-29 14:38 +0100
Re: I want to change Iconpushbuttons:usecolor in a for-next loop....how? speedygonzales502@gmail.com - 2016-12-29 06:01 -0800
Re: I want to change Iconpushbuttons:usecolor in a for-next loop....how? "Jamal" <noooospam@example.com> - 2016-12-28 18:25 -0500
| From | "Raymond Steffensen" <raymond@up2ng.net> |
|---|---|
| Date | 2016-12-28 23:15 +0100 |
| Subject | I want to change Iconpushbuttons:usecolor in a for-next loop....how? |
| Message-ID | <_PW8A.209120$Xi4.69838@fx19.fr7> |
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
[toc] | [next] | [standalone]
| From | "Karl-Heinz" <invalid@invalid.invalid> |
|---|---|
| Date | 2016-12-29 18:01 +0100 |
| Message-ID | <ecktt6F1ht5U1@mid.individual.net> |
| In reply to | #10094 |
Hi Speedy
> 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
try calling the attached SymIVarPut() function below from one of your window
methods.
e.g.
aSymControls := ArrayNew ( 34 )
FOR i := 1 UPTO 34
aSymControls [ i ] := String2Symbol ( "BUTTON" + NTrim ( i) )
NEXT
SymIVarPut ( SELF , aSymControls , #Usecolor ,
Brush{Color{COLORGREEN},HATCHSOLID )
BTW. There´s no need to switch the controls from protect to export in
the painter.
--------------
FUNCTION SymIVarPut ( oWin AS Window , aSymCtrlNames AS ARRAY ,
symAssignName AS SYMBOL , uValue AS USUAL ) AS VOID PASCAL
LOCAL aChildren AS ARRAY
LOCAL i , dwLen AS DWORD
dwLen := ALen ( aChildren := oWin:GetAllChildren() )
FOR i := 1 UPTO dwLen
IF IsAccess ( aChildren [i], #Namesym ) .AND. AScan ( aSymCtrlNames
, aChildren [i]:Namesym ) > 0
IVarPut ( aChildren [ i ] , symAssignName , uValue )
ENDIF
NEXT
RETURN
-----------
regards
Karl-Heinz
[toc] | [prev] | [next] | [standalone]
| From | D.J.W. van Kooten <vankooten@removethis.ic2.com> |
|---|---|
| Date | 2016-12-29 14:38 +0100 |
| Message-ID | <k84a6cpbo4ahh8ofqnfe498us287h9ms6q@4ax.com> |
| In reply to | #10094 |
Replying on message of Wed, 28 Dec 2016 23:15:22 +0100 from Raymond Steffensen: Hello Raymond, >I have 34 push buttons I want to change background color on, and I found the >iconpushbuttons LIB >There I can use the following: I use HoverButtons for it, still a very easy way to create button with colour, bitmaps etc. for most type of window. I can send you the code + how to implement it to the mail address you use in this NG, if you want. Dick
[toc] | [prev] | [next] | [standalone]
| From | speedygonzales502@gmail.com |
|---|---|
| Date | 2016-12-29 06:01 -0800 |
| Message-ID | <a9d23f9e-1171-4407-bc4f-b70fcf8dfb6c@googlegroups.com> |
| In reply to | #10097 |
Hi Dick Yes please 😊 speedy alfa up2ng.net Thanks 👍 Raymond
[toc] | [prev] | [next] | [standalone]
| From | "Jamal" <noooospam@example.com> |
|---|---|
| Date | 2016-12-28 18:25 -0500 |
| Message-ID | <o41hku$oc4$1@news.albasani.net> |
| In reply to | #10094 |
IVarGetSelf() returns the contents of a specific EXPORT or INSTANCE
variable. By default, controls are saved as PROTECT variables.
Try this:
Change the dialog/window property Export Control to Yes.
HTH,
Jamal
"Raymond Steffensen" wrote in message
news:_PW8A.209120$Xi4.69838@fx19.fr7...
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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web