Re: Grid = Container Class behavior

Author: GOPAL

Posted: 2000-08-30 at 12:49:51

Hi Hilton

I also have the same problem, I am using container in grid since long time

but I also tried so many ways, no result. You cannot change the property

based on the control. becasue the control object may be display more than

one time according to the no of rows but the object property is one.

If you say forecolor=xxx that applies for the whole column. There is no

dynamic property except grid columns.

Gopal

( I may be wrong, let's see if anybody gives a solution)

----- Original Message -----

From: A Hilton <ahilton@usexpr.com>

To: Multiple recipients of ProFox <profox@leafe.com>

Sent: Tuesday, August 29, 2000 6:31 PM

Subject: Grid = Container Class behavior

> Does anybody have some ideas on this?

>

> I have a grid (my old nemesis!) showing records from a table in a

database.

> I've made a class based on the container baseclass that I add to the

grids'

> 1 and only column. The container class has several lables, textboxes,

> comboboxes, etc. This allows me to show multiple fields for each record in

> the table without the user having to scroll horizontally. This all works

> and is fine (with very frustrating limitations I've found in the past).

>

> I'm wanting to have one label on the container class turn to a red

forecolor

> when a field in the record is empty. I've tried doing this many ways but

> they all boil down to refreshing the grid which refreshes the container

> class which does something like...

>

> if empty(field)

> this.label1.forecolor = red

> else

> this.label1.forecolor = black

> endif

>

> Here's the problem: The label is only turning red when the focus is on the

> particular record that has an empty field (instead of doing it when the

> focus is on some other record that doesn't have the empty field in the

> record) AND *all* records' (3 or 4 records show at once on the form)

> container class labels turn red (not just the record that has the empty

> field).

>

> I want the label to turn red whether or not the focus is on that

> empty-fielded record AND for ONLY that label to turn red instead of ALL

the

> labels turning red for each record.

>

> I've tried using the grids' setall method for Dynamicforecolor/backcolor

to

> get a highlighted row as well but the container class covers up the entire

> row and won't show.

>

> So, did I explain the situation well enough and does anybody have a clue

> what I should try next?

>

> - A Hilton

>

>

>

> ----------------------------------------

> Subscription maintenance at:

> http://leafe.com/mailListMaint.html

>

>

>

©2000 GOPAL