473,412 Members | 3,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

VB.Net listBox - smooth scrolling - owner drawn listBox

Hi All,

I've got an owner drawn listBox where I draw and measure the items that I add
to the listBox. For example, I have a listBox that can only display 10
characters on each horizontal line. The majority of my items contain much
more than 10 characters and thus the reason for my use of owner drawn
listBoxes - I do not want to use a horizontal scrollbar, instead I want the
text of each item to wrap onto multiple lines. I do use a vertical scrollbar.
My problem occurs when one of my items contains text that wraps onto more
lines than can be displayed within the listbox. For example, the user can
only see 5 lines of text in the listBox. If I have 5 items, all with only
one line of text, the user can see all items in the listBox. If I have 1
item with 5 lines of wrapped text, the user can see the entire item in the
listBox. If I have 1 item with 6 lines of wrapped text in a listBox that is
only tall enough to display 5 lines of text, the user can only see the top 5
lines of wrapped text and the last (6th) line of wrapped text is not visible
to the user. When I use the vertical scrollbar to attempt to view the last
(6th) line of text, I am not able to.

If I have 2 items in my listBox, both with wrapped lines of more than 5
(taking into account that the listBox is only tall enough to display 5 lines
of text), for the first item I am able to see the top 5 lines of text, and
when I use the vertical scrollbar to view the remaining wrapped lines of the
first item, rather than seeing the remaining lines of text for the first item,
I see the first 5 lines of wrapped text for the second item.

I am assuming that this is because listBoxes items are defaulted to only one
line of text, thus the need for smooth scrolling (as is available with a
textBox) is not available. Does anyone know what I can add/adjust so that I
can allow the user to view the remaining lines wrapped text for an item that
contains more wrapped lines of text than can be displayed in a listBox,
without using a horizontal scrollbar?

Thanks in advance for any suggestions y'all can offer!

Aug 1 '07 #1
0 2656

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

Similar topics

2
by: singhalvr | last post by:
Does anyone know how I can add a progress bar into a listbox in C# or VB.NET? I want to basically show a list of files that are transferring (or have some operation being performed on them...
1
by: Patty O'Dors | last post by:
Hi I have some code to create an ownerdrawn listbox (derived), and when I add an item to it, the bold text of the first item (the title, 'Collections and Maturities') mysteriously seems to get...
2
by: John R. | last post by:
I want to have a listbox that shows a checkbox and a textbox. I created a user control that has a checkbox and a textbox in it and have been trying to add it to a listbox but I can't get it to...
4
by: James Radke | last post by:
Hello, I am creating an owner draw listbox for a windows application. It is all working, except the performance is significantly slower than the standard listbox. Basically what I have done is...
2
by: dan heskett | last post by:
I am owner-drawing a listbox, in an attempt to create a nice list with some custom "fields" and text layout. Essentially it works, but I must be missing something big, conceptually, because I...
1
by: DigitalMythic | last post by:
Just to set the scene, I have a listbox in an application which im working on. The List box will have owner drawn items in it when it has items. To start with the listbox is empty. What Im...
17
by: pigeonrandle | last post by:
Hi, I have seen loads of different ways to do this, but the all seem to yield the same result - text that doesn't flicker when it's moving too slowly! Does anyone know 'the best way' to make text...
0
by: evan | last post by:
Hi, Pleeeeeaaaassseee help. I have spent literally days looking for a solution to this problem but cannot find the solution. Does anyone know how to smooth scroll a listbox? I can scroll using...
1
by: Bishman | last post by:
Hi, I have been trying to get text to scroll smoothly accross a windows form using GDI+ and a timer. Changing the position of the text by a configurable amount and calling invalidate to force a...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...
0
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...

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.