Click here to Skip to main content
15,899,679 members
Home / Discussions / Windows Forms
   

Windows Forms

 
QuestionWhich API is used for changing the video settings. Pin
balaji_vbr8-Jun-08 1:24
balaji_vbr8-Jun-08 1:24 
QuestionDrawing on Desktop Pin
jamie5508-Jun-08 0:34
jamie5508-Jun-08 0:34 
AnswerRe: Drawing on Desktop Pin
Giorgi Dalakishvili8-Jun-08 20:37
mentorGiorgi Dalakishvili8-Jun-08 20:37 
GeneralRe: Drawing on Desktop Pin
jamie5508-Jun-08 22:53
jamie5508-Jun-08 22:53 
GeneralRe: Drawing on Desktop Pin
Giorgi Dalakishvili9-Jun-08 3:45
mentorGiorgi Dalakishvili9-Jun-08 3:45 
QuestionComboBox Question Pin
supD7-Jun-08 23:10
supD7-Jun-08 23:10 
AnswerRe: ComboBox Question Pin
Alan N9-Jun-08 6:36
Alan N9-Jun-08 6:36 
QuestionMaintain Textbox Scroll Position Pin
K.L.K6-Jun-08 12:08
K.L.K6-Jun-08 12:08 
Hi,

I'm outputting some logging output to a TextBox, using the following code:

        public void AddNewMessage( String message )
        {
            lock (this)
            {
                if (disposed)
                    throw new ObjectDisposedException( "PeerMessagesDisplay" );

                String text = this.textBox1.Text.Insert( this.textBox1.Text.Length, message );
                SetText( text );
            }
        }

        private void SetText( String text )
        {
            if (this.InvokeRequired)
                this.textBox1.Invoke( new Action<string>( SetTextHelper ), text );
            else
                SetTextHelper( text );
        }

        private void SetTextHelper( String text )
        {
            this.textBox1.Text = text;
        }
</string>


But, whenever text is appended to the textbox, it automatically scrolls up to the top. This is bad when I'm trying to observe the output at the bottom or somewhere in the middle. How can I maintain the textbox's scroll position?

Thanks,

klk

madness ? this.isSparta = true : this.isSparta = false;

AnswerRe: Maintain Textbox Scroll Position Pin
Rob Smiley7-Jun-08 11:19
Rob Smiley7-Jun-08 11:19 
GeneralRe: Maintain Textbox Scroll Position Pin
K.L.K7-Jun-08 17:12
K.L.K7-Jun-08 17:12 
GeneralRe: Maintain Textbox Scroll Position Pin
Rob Smiley8-Jun-08 0:42
Rob Smiley8-Jun-08 0:42 
GeneralRe: Maintain Textbox Scroll Position Pin
K.L.K8-Jun-08 8:51
K.L.K8-Jun-08 8:51 
GeneralRe: Maintain Textbox Scroll Position Pin
Rob Smiley8-Jun-08 10:54
Rob Smiley8-Jun-08 10:54 
AnswerRe: Maintain Textbox Scroll Position Pin
Luc Pattyn8-Jun-08 14:18
sitebuilderLuc Pattyn8-Jun-08 14:18 
GeneralRe: Maintain Textbox Scroll Position Pin
K.L.K9-Jun-08 8:55
K.L.K9-Jun-08 8:55 
GeneralRe: Maintain Textbox Scroll Position Pin
Luc Pattyn9-Jun-08 13:06
sitebuilderLuc Pattyn9-Jun-08 13:06 
Question[Message Deleted] Pin
AliN13626-Jun-08 5:38
AliN13626-Jun-08 5:38 
AnswerRe: Collision Detection Pin
Christian Graus6-Jun-08 6:14
protectorChristian Graus6-Jun-08 6:14 
GeneralRe: Collision Detection Pin
AliN13626-Jun-08 8:43
AliN13626-Jun-08 8:43 
QuestionDatabind adding error Pin
N a v a n e e t h5-Jun-08 23:59
N a v a n e e t h5-Jun-08 23:59 
AnswerRe: Databind adding error Pin
John_Adams8-Jun-08 22:44
John_Adams8-Jun-08 22:44 
GeneralRe: Databind adding error Pin
N a v a n e e t h8-Jun-08 23:29
N a v a n e e t h8-Jun-08 23:29 
QuestionHow to enable only vertical scrollbar in panel? Pin
cocoonwls5-Jun-08 23:37
cocoonwls5-Jun-08 23:37 
AnswerRe: How to enable only vertical scrollbar in panel? Pin
John_Adams6-Jun-08 4:50
John_Adams6-Jun-08 4:50 
QuestionDeployment for windows Project Pin
vishnukamath5-Jun-08 20:57
vishnukamath5-Jun-08 20:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.