Andre
assuming the portal TO is called ChildTable AND that you have a
unique ID field in this table, then you need 3 additional fields, 2
of which are globals and can really be in any table but to keep it
simple let's put all 3 in ChildTable:-
global field of same type as ID: g_SelectedRowID
global container field: g_HighLight
calc field with container result: RowHighLight = if ( ID =
g_SelectedRowID ; g_HighLight ; "" )
Copy a block of your chosen color (it only needs to be 1x1 pixels)
into g_HighLight
(an easy way to do this is to go to any layout and add the field
g_HighLight and a colored box (with no border) sized to 1x1 pixels,
copy the box, and in Browse mode paste into g_HighLight - if the
graphic format of g_HighLight is to 'Reduce or enlarge' with
'Maintain original proportions' UNCHECKED, the whole of g_HighLight
should fill with your chosen color - you can then remove the colored
box and g_HighLight from the layout if you want)
On your layout with the portal, put RowHighLight in the portal, size
it to cover the whole portal row, set its fill and border to
transparent and its graphic format to 'Reduce or enlarge' with
'Maintain original proportions' UNCHECKED; make it into a button with
an attached script (or script step) which sets
ChildTable::g_SelectedRowID to ChildTable::ID and, finally, move it
behind all other fields in the portal. (You may also want to make
these fields have transparent fill)
That should do it
cheers
Tom
On 19 Jan 2007, at 16:29, André Boey wrote:
I hope this isn't too complicated...
What do I have to do to make a portal row change color when clicked
on?
The portal shows a relationship between two tables; it isn't a self-
join.
The only purpose for the color change is to provide a visual cue to
the user
that the row is selected.
Thanks!
Andre