|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Help with truncatingHi,
I have another dumb newbe question. I tried looking in the help but, maybe I'm using the wrong search criteria. Oh well. My question is this. I would like to add the value of txtTimer1.Text to the end of my label text. What happens now is the text will scroll off the form. For example the txtTimer1.Text returns 1. 2. 3. 4. 5... etc. What I would like is after a value is returned it displays that value only and not a sequence of values. I would like to truncate to 1's, 10's, and 100's. Can someone point me in the right direction. Thanks. Regards, Ken frmKDMmain.lblFueltankquantity.Text = _ frmKDMmain.lblFueltankquantity.Text & " " & _ txtTimer1.Text I'm not sure if I'm following you, but if I am this is what I would do. If
you know how long your initial label (say 15 characters long) you can Left$(label.text, 15) & space(2) & txtTime1.text. This would keep writing over the old txtTime1.text information. Otherwise, if you don't know how long. Move the length in a variable at start. Dim iLen as integer iLen = Len(label.text) Then move your timer text label.text = Left$(label.caption, iLen) & space(2) & txtTime1.text -- Show quoteHide quoteIssy "ken" wrote: > Hi, > I have another dumb newbe question. I tried looking in the help but, > maybe I'm using the wrong search criteria. Oh well. My question is > this. I would like to add the value of txtTimer1.Text to the end of > my label text. What happens now is the text will scroll off the form. > For example the txtTimer1.Text returns 1. 2. 3. 4. 5... etc. What I > would like is after a value is returned it displays that value only > and not a sequence of values. I would like to truncate to 1's, 10's, > and 100's. Can someone point me in the right direction. Thanks. > Regards, > Ken > > frmKDMmain.lblFueltankquantity.Text = _ > frmKDMmain.lblFueltankquantity.Text & " " & _ > txtTimer1.Text > > > Hi Issy,
This is what's being displayed on the form: Fuel tank quantity 0 gallons 1 gallons 2 gallons 3 gallons 4 gallons etc. across the form When I want Fuel tank quantity # gallons were # is updated with the new value and "gallons" is fix on the form Ken On Mon, 23 Jan 2006 21:30:02 -0800, "Issy" <I***@discussions.microsoft.com> wrote: Show quoteHide quote >I'm not sure if I'm following you, but if I am this is what I would do. If >you know how long your initial label (say 15 characters long) you can >Left$(label.text, 15) & space(2) & txtTime1.text. This would keep writing >over the old txtTime1.text information. > Otherwise, if you don't know how long. Move the length in a variable at >start. > Dim iLen as integer > iLen = Len(label.text) > >Then move your timer text >label.text = Left$(label.caption, iLen) & space(2) & txtTime1.text > > ken wrote:
> Hi Issy, frmKDMmain.lblFueltankquantity.Text = _> This is what's being displayed on the form: Fuel tank quantity 0 > gallons 1 gallons 2 gallons 3 gallons 4 gallons etc. across the form > When I want Fuel tank quantity # gallons were # is updated with the > new value and "gallons" is fix on the form "Fuel tank quantity " &_ txtTimer1.Text &_ " gallons" Andrew Hi Andrew,
That did it. Thanks for the help. Ken On Tue, 24 Jan 2006 13:03:55 -0000, "Andrew Morton" <a**@in-press.co.uk.invalid> wrote: Show quoteHide quote >Andrew
forms collection?
vb.net / vs2005 Modifying a text file VS2005 - How do you... I can't figure out how to solve this problem. pull individual data element from a datasource? how to? accessing CD/DVD-ROM without drive letters .NET2.0: Performance von String-Operationen TimeZone problems Refernece an assembly using a string |
|||||||||||||||||||||||