|
| I have a browsbox with the field that contains the 50 statesof the US
as a field.
I have assigned 2 icons per state, one for a yes and one for a no.
Since using the Clarion 6 method of adding icons seem like it was
going to take forever to add icons to the browsebox plus the fact I
wanted to do more that one selection field per state, I decided to do
some investigation where the code was added to the app and handcode
it. I found out where the code was added to set the icons. I also
found where the code was added to set the icons in the browse boxes...
So I wound up doing it like this:
?List:2{PROP:IconList,1} = '~sty01.ico'
(which was what Clarion added)
! [Priority 7700]
then I add the below:
?List:2{PROP:IconList,2} = '~sty02.ico'
?List:2{PROP:IconList,3} = '~styb03.ico'
?List:2{PROP:IconList,4} = '~sty04.ico'
?List:2{PROP:IconList,5} = '~sty05.ico'
?List:2{PROP:IconList,6} = '~sty06.ico'
?List:2{PROP:IconList,7} = '~sty07.ico'
?List:2{PROP:IconList,8} = '~sty08.ico'
?List:2{PROP:IconList,9} = '~sty09.ico'
?List:2{PROP:IconList,10} = '~sty10.ico'
?List:2{PROP:IconList,101} = '~stn01.ico'
?List:2{PROP:IconList,102} = '~stn02.ico'
?List:2{PROP:IconList,103} = '~stn03.ico'
?List:2{PROP:IconList,104} = '~stn04.ico'
?List:2{PROP:IconList,105} = '~stn05.ico'
?List:2{PROP:IconList,106} = '~stn06.ico'
?List:2{PROP:IconList,107} = '~stn07.ico'
?List:2{PROP:IconList,108} = '~stn08.ico'
?List:2{PROP:IconList,109} = '~stn09.ico'
?List:2{PROP:IconList,110} = '~stn10.ico'
?List:2{PROP:IconList,401} = '~STATE.ico'
Notice that I started the numbering the second
set of icons at 100. This makes it easier for me to remember the
state
and the state of the state
Then I used the following code to show what icon goes where.
BRW6::st:state = st:state
Case st:state
of 1
If st:stateyes=1
BRW6::st:state:Icon = 1
else
BRW6::st:state:Icon = 101
End
of 2
If st:stateyes=1
BRW6::st:state:Icon = 2
else
BRW6::st:state:Icon = 102
End
of 3
If st:stateyes=1
BRW6::st:state:Icon = 3
else
BRW6::st:state:Icon = 103
End
of 4
If st:stateyes=1
BRW6::st:state:Icon = 4
else
BRW6::st:state:Icon = 104
End
of 5
If st:stateyes=1
BRW6::st:state:Icon = 5
else
BRW6::st:state:Icon = 105
End
ELSE
BRW6::st:state:Icon=401
END
Each state has a number assigned and when the state corresponds with a
number then the case statement reads it and then checks another field
for a 1 or 0.
The problem is the first set of icons work great, but the second set
doesn't. Also icon 401 works as well. I tried renaming the icons, I
tried to change the numbers but the second set just do not work.
Can someone give me some help?
Thanks in advance
Carroll
|
|