Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

changing text in static text control

892 views
Skip to first unread message

TonyMIS

unread,
Nov 24, 2009, 2:16:06 PM11/24/09
to
Hello
PB 11 build 8123

I have a window with a dwcontrol. When I am updating the dw control I
want one of the column names (static text controls) to change based on
a value I select in another column.

So far I have the code in the itemchanged to capture the value of my
selection in the field I first select.

How do I take this value, (it can only be Y or N) and program one of
the column headings (static text) to display a certain text?

I can't seem to get it to work with setitem or settext. Those two
funcs don't really work with column headings as far as I can see.

Any help is greatly appreciated.
Sincerely
Tony

Ivaylo Ivanov

unread,
Nov 24, 2009, 2:41:13 PM11/24/09
to
dw_control.Modify("colname_t.Text='yourtext'")

where "colname_t" is the name of the static text control above the desired
column (see it in the DW painter).

Also, have in mind that the newly selected value on the ItemChanged event
cannot be obtained with GetItemString, it's in the "data" argument passed to
this event.

Regards,
Ivaylo

"TonyMIS" <aest...@bostonfinancial.com> wrote in message
news:3b3826c7-cce9-4286...@e7g2000vbi.googlegroups.com...

TonyMIS

unread,
Nov 24, 2009, 2:49:46 PM11/24/09
to
On Nov 24, 2:41 pm, "Ivaylo Ivanov" <n0_S_p_a_m_i.iva...@isy-dc.com>
wrote:

> dw_control.Modify("colname_t.Text='yourtext'")
>
> where "colname_t" is the name of the static text control above the desired
> column (see it in the DW painter).
>
> Also, have in mind that the newly selected value on the ItemChanged event
> cannot be obtained with GetItemString, it's in the "data" argument passed to
> this event.
>
> Regards,
> Ivaylo
>
> "TonyMIS" <aeste...@bostonfinancial.com> wrote in message

>
> news:3b3826c7-cce9-4286...@e7g2000vbi.googlegroups.com...
>
>
>
> > Hello
> > PB 11 build 8123
>
> > I have a window with a dwcontrol. When I am updating the dw control I
> > want one of the column names (static text controls) to change based on
> > a value I select in another column.
>
> > So far I have the code in the itemchanged to capture the value of my
> > selection in the field I first select.
>
> > How do I take this value, (it can only be Y or N) and program one of
> > the column headings (static text) to display a certain text?
>
> > I can't seem to get it to work with setitem or settext. Those two
> > funcs don't really work with column headings as far as I can see.
>
> > Any help is greatly appreciated.
> > Sincerely
> > Tony- Hide quoted text -
>
> - Show quoted text -

Thanks, the information is greatly appreciated.

Jeremy Lakeman

unread,
Nov 25, 2009, 1:11:30 AM11/25/09
to

Does it have to be a static text object?
Why not change it to a computed field, or add an expression to the
text property itself.

That way you don't need to worry about how the values in the
datawindow change, the expression will always be re-evaluated at the
appropriate time.

0 new messages