changing text in static text control

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
0
TonyMIS
11/24/2009 7:16:06 PM
sybase.powerscript 7704 articles. 0 followers. Follow

3 Replies
735 Views

Similar Articles

[PageSpeed] 46

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" <aesteves@bostonfinancial.com> wrote in message 
news:3b3826c7-cce9-4286-a55e-5c3ce82011ad@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 


0
Ivaylo
11/24/2009 7:41:13 PM
On Nov 24, 2:41=A0pm, "Ivaylo Ivanov" <n0_S_p_a_m_i.iva...@isy-dc.com>
wrote:
> dw_control.Modify("colname_t.Text=3D'yourtext'")
>
> where "colname_t" is the name of the static text control above the desire=
d
> 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-a55e-5c3ce82011ad@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.
0
TonyMIS
11/24/2009 7:49:46 PM
On Nov 25, 5:16=A0am, TonyMIS <aeste...@bostonfinancial.com> wrote:
> 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

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
Jeremy
11/25/2009 6:11:30 AM
Reply:

Similar Artilces:

text cut off in static text control
I have a window that needs to display a path in an uneditable field. THe problem is that if the text is longer than the the field it makes the last word disapear so c:\Program is display instead of C:\Program Files\etc... Is there a way to stop the static text from doing this or to make a single line edit unselectable (so the text can't be highlighted)? You have several choices. If the UI element where this static text is displayed is fixed in size, then you are probably better off implementing a tooltip - see http://www.migmag.pair.com/pb/files/tooltip.zip On the other h...

Changing the text of an input (text) control
Hi everyone, please answer the following: I have a html input control as follows  <input id="newSearch_keywords" type="text" class="text" value="<%=JobsSearchBusinessObject.CurrentKeywords %>" name="newSearch_keywords""/>    When the page loads I need to look at the text of this input field and remove any * chars that are in the text. Thanks for your help <input id="newSearch_keywords" type="text" class="text" value="<%=JobsSearchBusinessObject.CurrentKeywords.Re...

text change, why wont you text change!!!!
Hi i've got a huge form with loadsa recordsets that populate text boxes, AND I MEAN LOADS!!!!It involves some calculationsI have text1.text which goes away and changes text2.text which is fine, but in text2.text i have another on text change thingy which it wont call :(any one have any ideas : )also does any one know how i could call a txt change, so it does the call total a. dont know if thats possible as well. Private Sub txtShare_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtShare.TextChanged Call Total_A() End SubThank you if any one one could help...

hi how to add static text with dynamic text for a label control
hi,  i am using gridview it has contain item template where i am using label control.label control text has been static string and Dynamic string. i have write code is like below mentioned please any one suggest me is  it possible and say how is possible.   <asp:TemplateField > <ItemTemplate> <asp:Label ID="Label1" runat="server" Text=sub:"<%#bind("firstname") %>"></asp:Label> </ItemTemplate>   </asp:TemplateField> Hi, Use this in your lable text property Text='<%# string....

Text as text
Name: JohnA Boice Email: jaboiceathughesdotnet Product: Firefox Summary: Text as text Comments: You need to do as Safari does and make ALL text, including buttons, links, bookmarks, and general page text actual text so screen readers can interpret and voice the text. Until this occurs, your products are a real pain to use. And I have limited sight. What about those with less or no sight? Browser Details: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 ...

Enabling button after text changed on text box from form view control
I'm using form view to display some text box that contains user's personal info. There are "save" buttons for each text box which are disable as default. I want to enable them when text is changed on the the text box. I don't know how to write the the JavaScript function to do this task and i also don't know how to call the function from the the textbox control (onchange or ontextchange?). Here is the formview code: <asp:FormView ID="FormView1" runat="server" DataSourceID ="personalSQL"> <ItemTemplate > <ta...

chinese character in rich text control and text control
I have a chinese character in either rich text control or text control. The character is look fine if it is a small size (10, 12), however when the font size is changed bigger (36 or 72), the character is out of shape(many dot, not smooth). Is anyone has any idea to print a bigger chinese character from pb7.03. ...

changing the text on text box
hello, i need to build an addon which takes (on mouse click) the text of any given input text box and change it. how do i get theobject of the text box and set my text to its value. thanks... ...

Pasting text from Mac apps into rich text controls pastes plain text
Name: Bob Product: Firefox Summary: Pasting text from Mac apps into rich text controls pastes plain text Comments: Using: Mac OS X 10.6 and Firefox 3.5 and 3.6 beta 1 Steps to reproduce: * Write text in Text Edit, Yojimbo, etc using rich text (e.g. font sizes, bold, italics) * Open Gmail in Firefox and compose an email * Copy and paste the text you created from the other Mac app into Firefox Observed: text is pasted in as plain text Expected: converts the rich text to appropriate rich text in the control, like Safari does This is a huge pain when e.g. writing release n...

How to populate other text controls by losing focus of one text control
 Hi All,Iam new to ASP.net. Here is a small illustration about my prob. I have 3 text controls in a page i.e which represents zip,city,state. I want to populate city and state after entering zipcode into zip text control i.e something like focus lost event on zip text control. Any solution regarding this thanks and regards,vijaycanaan How about OnTextChange: http://msdn.microsoft.com/en-us/library/aa710190(VS.71).aspx EricPascarello.com | Twitter epascarello | LinkedIn Hi vijaycanaan We can capture the following event when TextBox  lost focus: On Server-Side:We...

Changing Bold Underline etc in Single Static Text Control
I would like to be able to change the bolding, underline, and text color of PARTS of a string in a static text control. i.e. : <Underline>Label:<End Underline> some more text. <Red>Some red text<End Red> So Label: would be underlined, "some more text" would not and "Some Red Text would be the color red". I need to do this in one control. (If this helps, I am using the control as a context sensitive mouse cursor in a drag drop operation. As the user moves the mouse, the control follows the mouse telling him what he is moving and what h...

text controls, when they change update the total control
I have 4 text field server controls formatted in currency like $1.00 like this one called Mastercard: <td width="130" style="WIDTH: 130px">Mastercard </td> <td width="21" style="WIDTH: 21px"><INPUT onkeypress="return(currencyFormatCents(this,',','.','$',event))" id="Mastercard" type="text" name="Mastercard" runat="server" style="WIDTH: 116px; HEIGHT: 22px" size="14"></td> When This control, or any of the other 4 I want to update a lab...

'&' gets changed to ' _' in a static text control in a dw
i have a static text control in my (by now infamous) grid dw. when the mouse hovers over a field thats not visible, the static text gets positioned there and the value of that field gets assigned to the static text control's text property. however, when i assign a string with a '&' (ampersand) in it, pb substitutes it with ' _' (space and an underscore). im using modify btw. ive tried to stick a tilde in front of it, use the hex value, put the tilde in front of the hex value, all to no avail. strangely enough, it displays fine in the regular char(whatever) c...

Whether a text fits in a text control
Hello, I have several text controls in windows and dw. Is there anyway to know if the text itself fits in the length of the text control (that is, if I will see the text completely) ? Thanks in advance Lena (PB 9.0) Take a look at this techdoc that I authored: http://www.sybase.com/detail?id=1024200 it's an example of using the GetTextExtent API to determine whether text does or does not fit. I am not certain about using it in the datawindow though. On 15 Jan 2004 02:23:56 -0800, "lena" <egarcia@cimkey.es> wrote: >Hello, > >I ha...

Web resources about - changing text in static text control - sybase.powerscript

The Changing Light at Sandover - Wikipedia, the free encyclopedia
"The Changing Light at Sandover" is a 560-page epic poem by James Merrill (1926–1995). Sometimes described as a postmodern apocalyptic epic, ...

Is Facebook Changing How We Travel?
When one of your Facebook friends posts a photo album of their trip to Maui, they’re not just showing off — they might also be acting as a travel ...

Missed this week's Changing Track?... - 774 ABC Melbourne - Facebook
Missed this week's Changing Track? We've got you covered. Like to submit your own? Email it to 774drive@abc.net.au

Facebook changing PMD program to Facebook Marketing Partners
Facebook’s Preferred Marketing Developer program may be getting a new look. Earlier today, Facebook announced on the Facebook for Business page ...

Changing Lanes (@chginglanes) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Changing the way business decisions are made
We believe that social data has unlimited value, and near limitless application. Today, we’re taking an important step toward unleashing this ...

12 Minutes To Create a Mind-Changing Presentation
... draft great presentations and to become a more effective and convincing presenter. Twelve minutes which can 12 Minutes To Create a Mind-Changing ...

We're Changing Our Name (Back) to Stack Overflow
We are Stack Overflow. You may know us from such popular websites as Stack Overflow Q&A, Stack Overflow Careers, The Stack Exchange Q&A Network, ...

The Tao of Twitter: Changing your life and business 140 characters at a time - Amazon
It's time to take the mystery out of Twitter. Twitter may be the most powerful business and personal networking platform ever created but it ...

App Store - Voices 2 ~ fun voice changing!
Read reviews, get customer ratings, see screenshots, and learn more about Voices 2 ~ fun voice changing! on the App Store. Download Voices 2 ...

Resources last updated: 12/24/2015 5:45:47 PM