Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: Greying out selector bar on non-active browses 1998-06-22 -- Johan Rademan It needs two local variables
loc:last_fld long
loc:selected_fld long
and add this code to the following embed
CASE EVENT() structure, before generated code
the code to embed
Of Event:Selected
! save the currently selected field, so that the selected function not
called many times
loc:selected_fld = Selected()
! only execute the code if the current field is a list
if loc:selected_fld{Prop:Type} = CREATE:list
! this comes out of the online help, you need to loop through the
array that makes up a row in a list box
loop x# = 1 to 255
if loc:selected_fld{PROPLIST:Exists,x#} = 1
! set back to the original color as specified in the screen
properties
loc:selected_fld{PROPLIST:TextSelected,x#} = COLOR:none
loc:selected_fld{PROPLIST:BackSelected,x#} = COLOR:none
else
! if no more columns then break out of the loop
break
end
end
end
! only do this if the last field was a list
if loc:last_fld{Prop:Type} = CREATE:list
loop x# = 1 to 255
if loc:last_fld{PROPLIST:Exists,x#} = 1
loc:last_fld{PROPLIST:TextSelected,x#} = COLOR:White
loc:last_fld{PROPLIST:BackSelected,x#} = COLOR:Gray
else
break
end
end
end
! save the current field so that we know to reset it on the next list
selected
loc:last_fld = loc:selected_fld
Today is November 21, 2024, 3:39 am This article has been viewed 35190 times.
|
|