Textbox - Set The Position Of A Vertical Scrollbar?

Apr 7, 2012

I have a TextBox control with a lot of text which has a vertical scrollbar, and every time I hide/show the control the position of the scrollbar stays the same. I'm trying to figure out how to change the position of the scrollbar to the top of the textbox, as if it were at the beginning of the text.

View 1 Replies


ADVERTISEMENT

Textbox With Vertical Scrollbar - Get The Scrollbar Position Without Having To Reposition The Carat?

Oct 21, 2010

So with the stock Textbox, I set the Scrollbars property to Vertical. This is great if the text in my box never changes; I can scroll up and down while the box sits still. If I'm running a background operation that logs output to the box though, the scrollbar resets itself to the top every time I append text to the box.

I know I can set the Textbox.Selection property (or use the Select method) to reposition the carat in the textbox, make note of that position in a variable, then append text, reset the carat, and use the ScrollToCarat method to reposition the scrollbar where it belongs. That's a really (ridiculously) long way around. Anybody know if there's another/better way of holding the scrollbar position, short of actually building a custom control (or using a Textbox and a separate Scrollbar)? It never hurts to try. In a worst case scenario, you'll learn from it.

View 8 Replies

VS 2010 - Textbox Scrollbars - Show Only The Vertical Scrollbar

Jan 10, 2010

I set the Scrollbars property of textbox to ScrollBars = Both but the textbox shows only the vertical scrollbar. (i already set the Multiline = True)

View 2 Replies

Forms :: Detecting A Textbox Scrollbar Position?

Nov 2, 2009

I need to set a variable upon the user scrolling to the end of the text on the textbox ("Scroll to end to accept terms") type thing but I can't seem to find how to get the value.

View 2 Replies

Get Vertical Scrollbar For Form1?

Apr 25, 2010

My problem is that I built this program for my VB class, but I built it on my desktop at home which is a 23" monitor. When this is opened on a smaller screen, you dont get to see all of the project. I want to add a vertical scroll bar but that is beyond what I have been taught and beyond what my book teaches...

how to get a vertical scroll bar to scroll the whole form?

View 1 Replies

Get Vertical ScrollBar Postion?

May 25, 2009

I have a TOS agreement that i would like my user to have to view ...

basically the same way "World Of Warcraft" does it ...

You must scroll to the bottom for the accept button to be enabled and clickable...

but in vb.net i cant seem to find a way to determine the vertical scrollbar postition .

View 5 Replies

PictureBox - Vertical And Horizontal Scrollbar

Aug 27, 2004

The scroll bars actually move now, They just move the wrong thing. When I click the Horizontal bar it moves the picture box to the left part of the screen and I can scroll the box back and forth. If I click the Vertical Bar it goes up to the top and I can move it up and down. So if I click both of them, the picture box goes to (0,0) of the form. It wont move the image inside. I can't figure out how to assign the scrollbars to the image instead of the picturebox.

Try making a form with a Picturebox, Vertical Scrollbar and Horizontal Scrollbar in it and rename all your stuff the way I got mine:
Horizontal Scrollbar = hsbPicMap
Vertical Scrollbar = vsbPicMap
Picturebox = picMap

Set the image property in the properties box to whatever you want. Try to make the picturebox of fairly big size. Mine is set to 656, 528 in pixels, and the location is 152, 72 on the form. The image I am using is about 1500, 1200. The bars are on the right side and the bottom of the picturebox.
Code:
Public Class frmMap
Inherits System.Windows.Forms.Form
Private Sub HSBpicMap_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles hsbPicMap.Scroll
picMap.Left = -hsbPicMap.Value
[Code] .....

View 3 Replies

Set ListBox Vertical Scrollbar Value To The Same As Before Updating?

Jan 10, 2011

I have a listbox which content is based on a treeview. When the user doubleclicks an item in the listbox the treeview will be updated and aftervards all the items in the listbox will be removed and the text of each TreeNode in the TreeView will be addedto the ListBox

View 2 Replies

The Vertical Scrollbar Of Datagridview Will Be Un-functional

Sep 1, 2009

I faced a problem that the vertical scrollbar of datagridview will be un-functional.Here are the steps to rebuild the problem:

1. Add a new datagridview component.

2. Add a new timer to set the datasource of datagridview at a regular time. For example, I add following code on the Timer1.Tick event:

Dim v_connDB As New Odbc.OdbcConnection
Dim v_daCA2 As New Odbc.OdbcDataAdapter
Dim v_dsCA2 As New Data.DataSet

[code]....

3. Then I press the down arraw key on the vertical scrollbar with mouse while the datagridview re-bind its datasource, the vertical scrollbar will be un-functional. And the action will be changed to be re-size the datagridview will I press the vertical scrollbar position.So, is it the bug of datagridview? How can I fix it?

View 5 Replies

Webbrowsercontrol Not Displaying Vertical Scrollbar

Mar 24, 2011

I have windows application in which I have web browser control. I want to display vertical scrollbar, somehow its not getting displayed. Is there any way of enabling the scrollbar or any property which need to be set. I have already set the ScrollEnabled

View 7 Replies

2008 : Show Only Vertical Scrollbar - Webbrowser

Oct 24, 2009

I would like to know how i can make only visible the vertical scrollbar of my webbrowser

View 1 Replies

Any Way To Find Out What Distance Vertical Scrollbar On Rtb Has Moved

Feb 9, 2010

I want to know if there is any way to find out what distance vertical scrollbar on rtb has moved(in twips or inches)?

View 1 Replies

Change The Width Of The Vertical Scrollbar In A Listview?

Jul 10, 2011

is it possible to change the width of the vertical scrollbar in a listview .When the scrollbar width is bigger, its easier to operate by hand on a touch screen.

View 1 Replies

Use A Vertical And Horizontal Scrollbar And Have The Arrow Keys?

Jan 14, 2010

I'm having a problem assigning the arrow keys to the right scrolling events.I have a VScrollbar and an HScrollbar. I want the left / right arrow keys to scroll the horizontal bar, and the up / down arrow keys to scroll the vertical bar. The default behaviour seems to be that the first created of the two (VScrollBar or HScrollbar, depending on order of creation) received all arrow key events as a Scroll event. So when I push up / down / left / right, it is my VScrollbar that moves (HScrollbar might move also with the left / right arrow keys, I don't remember). I tried catching the KeyDown event on my form, to manage the left / right / up / down keys myself, but apparently the Scroll events are triggered first...In any case, what would be the "right" way to use a vertical and horizontal scrollbar and have the arrow keys do what they're supposed to do in VB. NET?

View 2 Replies

[2005] Panel Vertical Scrollbar: Scrolling It To Zero Or Top?

Feb 15, 2009

When a panel's AutoScroll is set True then it will add scrollbars for navigation of the entire size of its content. What I want is to be able to set the vertical scrollbar to go to top or zero so its contents top controls will be viewable.

View 9 Replies

Moving Labels Inside A Groupbox Using Vertical Scrollbar?

Jun 9, 2011

I have a load of information on my label in a groupbox on the form there is too much information to be seen in one go so i want to use a vertical scrollbar to move the label up and down inside the groupbox so it can be read.

The issue i'm having is:

1: The label covers the bottom edge of the groupbox (looks a little naff) i need it to fall inside the groupbox if possible.

2: Any movement on the vertical scrollbar seems to send the label in one direction only - so how do i work it so that up moves it up and down moves it down?

Should i use a multiline textbox rather than a label and move the carat?

View 3 Replies

Set The Background Color Of A Label Based On The Value Of A Vertical Scrollbar

Apr 6, 2011

I need to set the background color of a label based on the value of a vertical scrollbar. i.e, if the user click the vScrollBar the background color of label must change like from 0 to 255.if it reaches to 255 again initialise to 0. I tried color.FromARGB function but it is not working.

View 2 Replies

Set The Maximum Range For The Horizontal And Vertical Scrollbar In A Panel?

May 21, 2011

How do you set the maximum range for the horizontal and vertical scrollbar in a panel
in VB.NET 2008 ?

View 1 Replies

Vertical Scrollbar Getting Smaller, But No Data Is Shown In The Listbox?

Jan 9, 2009

I have been working on a much larger project and came to a point where I decided threading should be used.It seems in previous version of .Net, a background worker was able to update controls that were were not created on that thread. Now, it doesn't seem to be the case.I basically just began a new small project to try and teach myself the basics.Form1 Consists of A listbox, A progress bar, a label and two buttons, one to start and one to cancel.

imports system.threading
private sub btngo(byval sender as system.object, byval e as system.eventargs) handles btngo.click
pbprogress.minimum = 0[code=....

This code appears to be updating the listbox.I can see the vertical scrollbar getting smaller, but no data is shown in the listbox. The progressbar is also updating properly while that is working, indicating proper background operation.But what it's not doing is this:

1. Label is not updating percentage

2. The form is not free to be used by the user (me)

View 17 Replies

[2005] Datagridview Vertical Scrollbar Doesn't Scroll?

Mar 9, 2009

I have a datagridview in my for that contain some infos like name of a file, date and hour but the vertical scrollbar doesn't work, the scroll doesn't move. Here's my code

If Me.ofd_Fichier.ShowDialog() = DialogResult.OK Then
Dim str_Fichier As String
For Each str_Fichier In ofd_Fichier.FileNames

[code].....

View 3 Replies

Change The Vertical Scrollbar Width On A Multi-line Text Box?

Sep 30, 2010

I'm working on a VB.NET application using VS2010 for an application that will run on a touch-screen. I have a problem with a mutli-line text boxes, ListBoxes and DataGridView controls which contains a vertical scroll bar. The scroll bar is too small for anyone with big fingers. Is there any way to make that scroll bar wider so that it's more "finger friendly"?

View 6 Replies

Set Vertical Scrolling Position From One Grid To Other?

Jan 20, 2010

on my form I got two datagridviews.When I scroll one of them to left/right the other grid should get the same scrolling position.I found "Verticals crollingoffset" but this is readonly.How do I set vertical scrolling position from one grid to the other? One has scrollbars visible, the other not (it is used as a filter with one empty row)

View 1 Replies

Set Scrollbar Position In Program?

Nov 3, 2011

I have one gridview which was in a panel and I set panel's Scrollbars property as vertical and height 200px. Gridview has number of rows (say 1000). If i scroll down and selected a 900th row,scroll bar will move to top.I want to focus on that row after selection(ie.scroll bar will be on the same position when we selected).

View 1 Replies

VS 2008 Get Scrollbar Position?

Jan 16, 2012

What i need is when i click a button it will msgbox the position of the vscrollbar.

View 4 Replies

Adjusting The Position Of The Vertical Scroll Bar In Code?

Oct 29, 2009

I have a windows form which contains a group of panels in a flowlayout control. Each panel has a button acrossthe top which is always visible and clicking on it expands the panel to view the other controls on it. clicking on it again shrinks the panel back to the size of the button. A simple form of menu. The flowlayout control has autoscroll enabled and as enough panels are resized (opened) they obviously are too big for the form and a scroll bar pops up.To get the most recently opened panel in the viewable area I use

FlowLayout.ScrollControlIntoView(pnECBF)

where pnECBF is the panel just resized. This works but places the panel at the bottom of the form i.e just in the visible area. I want the user to be able to see the panel AND the next menu button which is on the subsequent panel. So basically what I want is the panel into the visible area +25 pixels for the next panels menu button.

View 4 Replies

Richtextbox - Get Vertical Scroll Bar Position As Integer?

Oct 25, 2009

I have a RichTextBox and I need to find the position of the vertical scroll bar.

Is there any way to do this without Pinvoke? If not, what is a way to do this WITH Pinvoke?

I need to return an integer value.

View 1 Replies

Position Of Caption Changes With Changing Scrollbar Either Up Or Down?

Nov 15, 2011

How to move label caption with clicking VScrollbar.Label value changes with VSCrollbar according to the code:label1.caption=vscrllbar1.value.But I need the position of the label caption changes with changing the scrollbar either up or down?

View 1 Replies

VS 2008 : DataGridView Horizontal Scrollbar Position?

Apr 5, 2011

I am working DataGridView in vb.net08.The intresting task is ,When i move the Horizontal Scrollbar in DataGridView from Left to Right ,the First two Columns should be stable and moving starts from 3rd Column.Means If i moved at end of the right side but the first two columns should be visible. When i move the scroll bar the first two columns should not be disterb.Is there any property like Scroll bar position should be starts ??I tried the " FirstDisplayedScrollingColumnIndex" property but it only starts the Scrollbar from giving column index after moving the scrollbar the first two columns are moving into left side.

View 2 Replies

Selection Of Multiple Folders At A Time / Scrollbar Position?

Jun 1, 2010

A couple of questions about the FolderBrowserDialog in VB .NET Express 2005...
1. How can I make it so this control allows selection of multiple folders at a time?
2. It remembers the folder I selected last time (in the same session), and highlights that folder, which is good, but that selected folder appears near the bottom of the window. Is there a way to make it so the previously selected folder appears in the middle of the window (i.e. the scroll bar is further down the window)? See screen shot attached for how it currently looks when the window opens.

View 2 Replies

VS 2005 DGV Vert Scrollbar Messing With Listbox Position

May 16, 2012

Very simply, I'm positioning a small ListBox over a DataGridView column when the user right-clicks and selects "Show Distinct Values". This works fine until the vertical scrollbar of the DataGridView is clicked. Once that's done the listbox pops up all the way over to the left edge of the DataGridView. As confirmation of the problem I created a small app to test with.

[Code]...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved