Flash Games

 FAQ   Search   Members   Groups   Register  User Control Panel      Login 

Your time now:
Mon Nov 23, 2009 8:48 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 10 posts ]  Bookmark and Share
Author Message
 Post subject: Text Box
PostPosted: Thu Oct 07, 2004 12:01 pm 
Offline

Joined: Thu Oct 07, 2004 11:56 am
Posts: 2
I need help on this as i have been stuck on this for a while

I am making a private chat program for me and a friend to connect directly. In the program is a text box to show the messages obviously.
Now what I want is either the text box automaticly scrolls down or it deletes all the messages when it reaches a certain length of characters but before it deletes the messages it saves them to a .txt file for future reference.

All help is welcome!

_________________
=)===>Assyrianz Rule<===(=


Top
 Profile  
 
 Post subject: the solution is
PostPosted: Fri Oct 08, 2004 12:03 am 
Offline

Joined: Wed Oct 06, 2004 7:27 pm
Posts: 10
Location: toronto
:D

hi the mulltiline feature of textbox can be set to true to solve this problem and if u want to save the messages in a text file . then put a option there
and use filesystem object to save it to some text file


regards

ashish

_________________
aki


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 10, 2004 8:10 am 
Offline

Joined: Thu Oct 07, 2004 11:56 am
Posts: 2
multiline is already enabled, what the problem is it wont scroll down, when the characters reach further than the user can see on the textbox, the textbox goes straight to the top when a message is sent or received

_________________
=)===>Assyrianz Rule<===(=


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 13, 2004 1:05 am 
Offline

Joined: Wed Oct 13, 2004 12:59 am
Posts: 0
had the same issue...

in the properties of the textbox, enable vertical scrollbars.

That way, when you reach the limit of the visual text, the scroll bars will become active and allow you to scroll.

Hope this helps


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 21, 2005 3:07 pm 
Offline

Joined: Wed Apr 20, 2005 8:54 pm
Posts: 16
Location: Abergavenny, Wales, UK
yea, they'll allow you to scroll but wont keep the focus on the bottom line, which i think ssShotguNnn is after. unfortuanatly i dont have the answer but im looking into it as i am now curious to the answer.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 22, 2005 1:57 am 
Offline
500+ Club
User avatar

Joined: Sun Nov 21, 2004 5:12 am
Posts: 826
Location: 127.0.0.1
Welcome to DEVPPL VBDude and ssShotguNnn!

as to the second part of you post, i think that once the text hits a certian number of characters, you can print them to a txt file, but im not sure how!

_________________
Web-Developing since '03
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 25, 2005 8:17 am 
Offline
100+ Club
User avatar

Joined: Fri Apr 08, 2005 8:32 am
Posts: 182
Location: India
hi shotgunn
instead of the txt box why dont you use rich text box it has much more options than text box and you can have part of the txt with bold diff font etc i think the solution for you prob lies in these 2 proiperties of rich text box

SelLength
The number of characters selected.

SelStart
An index, the starting point of text selected or the position of the insertion point of no text selected.

first find the length of the text in the text box using the fiorst property and then use the selstart and give the starting poiint as the length of the text
and then the cursor jumps to the final position

try this out if it doesnt work i'lll get you the code next time.

and one important thing
rich text box is a .ocx file or an activex control which comes free with vb
well you have to load it just like another activexcontrol

best of luck

--DAFUNKYMUNKY[/php]


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 25, 2005 8:24 am 
Offline
100+ Club
User avatar

Joined: Fri Apr 08, 2005 8:32 am
Posts: 182
Location: India
for all the properties of the rich text box you can visit these sites

http://exchange.manifold.net/manifold/m ... xt_Box.htm

and dont forget to set focus after the final step i mentioned that
this is one exampole of how to use selstart etcetc

Private Sub Form_Load ()
Text1.Text = "Two of the peak human experiences"
Text1.Text = Text1.Text & " are good food and classical music."
End Sub
Private Sub Form_Click ()
Dim Search, Where ' Declare variables.
' Get search string from user.
Search = InputBox("Enter text to be found:")
Where = InStr(Text1.Text, Search) ' Find string in text.
If Where Then ' If found,
Text1.SetFocus
Text1.SelStart = Where - 1 ' set selection start and
Text1.SelLength = Len(Search) ' set selection length.
Else
MsgBox "String not found." ' Notify user.
End If
End Sub

found it in Microsoft website

--DAFUNKYMUNKY


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 13, 2005 10:59 am 
Offline

Joined: Fri May 13, 2005 9:49 am
Posts: 9
I dont know about the rich text box, however i had this exact same problem before, we thought of a couple ways to fix it. one way that someone else tried (way too much work in my opinion) was to use a list box and a char cap on the message, however that is very messy in my opinion. Another option is to be lazy and insted of having each new message apear at the bottom, have it appear at the top and move everything else down, just save whats currently in the box to a string, then have the new version have the new message plus the rest (but only on the new screen, you dont send the entire chat box, just the message you send). While this does work just fine, it is a little anoying in my opinion.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 13, 2005 2:49 pm 
Offline
100+ Club
User avatar

Joined: Fri Apr 08, 2005 8:32 am
Posts: 182
Location: India
well ithink this is geettin a little too far i doubt if the ssshotgun is really gonna see this better stop it here or continue for the benifit of the devppl community

_________________
--------DAFUNKYMUNKY--------
::THE::NECESSARY::[D]EVIL::
....errr i mean munky....


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group - Flash Games - TNX Invitation Code - TNX Review


Webmaster - Excruciating - Johnathan - Kotik - Ash - Tomi - rangana - Phate - dflynn - Medley