473,597 Members | 2,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trying to force a vertical scrollbar to the "Bottom".

Hello Everyone,

Fairly new to c# here and have a question regarding scrollbars,
particularly a vertical scrollbar.

It looks like my options are restricted for the textbox scrollbars
being that I can enable vertical or horizontal scrollbars for the
textbox and their wrapping but thats it for modifications of the
scrollbar.

I'm trying to figure out a way to force a textbox vertical scrollbar
to the bottom, even after the textbox update with more data.

Right now i append data to a textbox and when the visible section of
the textbox goes beyond the screen area, each following textbox update
makes the scrollbar reset to the very top again. This only happens if
the user moved the scrollbar down before another update occurs.

I want to force that sucker to the bottom. Can i do something to force
its location perhaps in an event or somewhere?

-Buht
Nov 16 '05 #1
3 9888
buht wrote:
Hello Everyone,

Fairly new to c# here and have a question regarding scrollbars,
particularly a vertical scrollbar.

It looks like my options are restricted for the textbox scrollbars
being that I can enable vertical or horizontal scrollbars for the
textbox and their wrapping but thats it for modifications of the
scrollbar.

I'm trying to figure out a way to force a textbox vertical scrollbar
to the bottom, even after the textbox update with more data.

Right now i append data to a textbox and when the visible section of
the textbox goes beyond the screen area, each following textbox update
makes the scrollbar reset to the very top again. This only happens if
the user moved the scrollbar down before another update occurs.

I want to force that sucker to the bottom. Can i do something to force
its location perhaps in an event or somewhere?

-Buht


Change the selection to the end of the text (length of the text + 1) and
that should do it.

textBox.Selecti onStart = textBox.Text.Le ngth;
textBox.Selecti onLength = 0;

Try that.

Darwen.
Nov 16 '05 #2
David McClarnon <dm********@ntl world.com> wrote in message news:<co******* *********@newsf e5-win.ntli.net>.. .
buht wrote:
Hello Everyone,

Fairly new to c# here and have a question regarding scrollbars,
particularly a vertical scrollbar.

It looks like my options are restricted for the textbox scrollbars
being that I can enable vertical or horizontal scrollbars for the
textbox and their wrapping but thats it for modifications of the
scrollbar.

I'm trying to figure out a way to force a textbox vertical scrollbar
to the bottom, even after the textbox update with more data.

Right now i append data to a textbox and when the visible section of
the textbox goes beyond the screen area, each following textbox update
makes the scrollbar reset to the very top again. This only happens if
the user moved the scrollbar down before another update occurs.

I want to force that sucker to the bottom. Can i do something to force
its location perhaps in an event or somewhere?

-Buht


Change the selection to the end of the text (length of the text + 1) and
that should do it.

textBox.Selecti onStart = textBox.Text.Le ngth;
textBox.Selecti onLength = 0;

Try that.

Darwen.

Doesnt seem to be working. I set both of those member values to what
you recommended in the constructor of the form and its textbox. Then i
created a separate function to call after each update of my textbox
data with thosee values to try to force the location again.

I also turned off hideselection to be sure. Hrm...
Nov 16 '05 #3
bu******@gmail. com (buht) wrote in message news:<1f******* *************** ****@posting.go ogle.com>...
David McClarnon <dm********@ntl world.com> wrote in message news:<co******* *********@newsf e5-win.ntli.net>.. .
buht wrote:
Hello Everyone,

Fairly new to c# here and have a question regarding scrollbars,
particularly a vertical scrollbar.

It looks like my options are restricted for the textbox scrollbars
being that I can enable vertical or horizontal scrollbars for the
textbox and their wrapping but thats it for modifications of the
scrollbar.

I'm trying to figure out a way to force a textbox vertical scrollbar
to the bottom, even after the textbox update with more data.

Right now i append data to a textbox and when the visible section of
the textbox goes beyond the screen area, each following textbox update
makes the scrollbar reset to the very top again. This only happens if
the user moved the scrollbar down before another update occurs.

I want to force that sucker to the bottom. Can i do something to force
its location perhaps in an event or somewhere?

-Buht


Change the selection to the end of the text (length of the text + 1) and
that should do it.

textBox.Selecti onStart = textBox.Text.Le ngth;
textBox.Selecti onLength = 0;

Try that.

Darwen.

Doesnt seem to be working. I set both of those member values to what
you recommended in the constructor of the form and its textbox. Then i
created a separate function to call after each update of my textbox
data with thosee values to try to force the location again.

I also turned off hideselection to be sure. Hrm...


I wanted to follow-up.. With the help of a fellow co-worker I
discovered that one thing was missing with the above to statements...
the textbox.scrollt ocaret() function. Though my cursor was moving with
the above two statements, the scrollbar was not. Adding that
additional method to the two statements moves the attached bar to the
newly located cursor.

Thanks for your help!

Buht
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2085
by: Sean Berry | last post by:
This is the page in question
2
6554
by: Sean Berry | last post by:
Here is the page in question http://www.aquaticwhirlpools.com/v2/ The cell to the right, with "sitemap" and the dropdown menu will not align to the bottom in IE in windows. It works in all other browsers including Opera, Mozilla, Firefox, Netscape, etc. It even works in IE on Mac. Since IE on windows is probably the most used browser out there, I wanted to get it working for it as well.
3
2521
by: Gianni Rondinini | last post by:
i'm talking about this page: http://www.elleen.net/yanny/prova.html colours are awful, but they're there just to realize where divs begin and end. in firefox it works pretty good --well, at least it's almost what i'm expecting it to be--, but it's not perfect yet. with internet explorer it's completely messed up --and i don't understand why--, but i'm not going to talk about this at this moment. as you can see if you have a look at the...
7
4723
by: Lyle Fairfield | last post by:
I suppose something like this may have been posted before. I am unaware of it. It's intended to duplicate the gradient filter that MS provides in their manifestation of CSS. Yes, I know it creates a gazillion labels. ESPECIALLY I KNOW it could Screw Up Your Form, so PLEASE, make a few hundred safety copies before you try this at all. Yes, I know an image might be easier on a one time basis, but it's not likely to be as easily changed (I...
2
12184
by: Tasman | last post by:
Is there an equivalent of valign="bottom" for a table within a DIV using CSS? I've found I can center a table of buttons in a DIV with {margin-left:auto; margin-right:auto}. But I am unsure how to get this table to sit at the bottom of the DIV. Example code follows, or see http://home.exetel.com.au/tas/valign/test01.html
2
1437
by: Stephen Plotnick | last post by:
I'm getting a bottom line with Null values andit causes a problem; how do I get rid of it?
4
29374
by: john | last post by:
Hi to All, I am new to html authoring, so sorry if my terminology is not correct or exact. I would like to position a footer div to the bottom of the browser window. As I research in the web shows this could be done a containing element with "min-height: 100%;" and an absolute positioned element (div) inside, aligned to bottom ("position: absolute; bottom:0px")
0
1491
by: =?Utf-8?B?YmFtbm9sYQ==?= | last post by:
When using Windows Live Hotmail and the "bottom" reading pane option chosen, the messages list shows up but no message, not even when I (single) click on the message. The only way to open and read the actual message in the "bottom" reading pane format is to double click the message and read it in full view. This all happened when I accidentally fiddled with the divider between the messages list and the reading pane (I believe this is...
1
1601
by: firecomp | last post by:
void ClipboardSave(HWND hwnd) { static GLOBALHANDLE hGMemGraph; LPMETAFILEPICT lpMfp; hGMemGraph = GlobalAlloc(GHND,(DWORD)sizeof(METAFILEPICT)); if (!hGMemGraph) { OutOfMemory(); return;
0
7981
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8284
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8392
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6711
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5437
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3938
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1500
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.