473,782 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Listview vertical scrollbar only

tJ
I am trying to replicate the functionality/display of the MS Outlook
attachment box.

I now know how to gather the file type icons and I'm able to use them
in my listview with its' view property set to "smallicon" .

My problem is that when many items are displayed in the listview, BOTH
the horizontal and vertical scrollbars display. Is it possible to
enforce the vertical scrollbar ONLY? If so, can you please give me some
idea how to go about it?

Thanks in advance.

Tasneem

Nov 17 '05 #1
4 20814
> My problem is that when many items are displayed in the listview, BOTH
the horizontal and vertical scrollbars display. Is it possible to
enforce the vertical scrollbar ONLY? If so, can you please give me some
idea how to go about it?

Thanks in advance.

Tasneem


if you cannot accomplish that with .net, use win32 ShowScrollBar function
inside list's Layout event handler.
Wiktor Zychla
Nov 17 '05 #2
tJ
Hi Wiktor

Do u have an example?

Nov 17 '05 #3

Uzytkownik "tJ" <ta******@korbi tec.com> napisal w wiadomosci
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
Hi Wiktor

Do u have an example?


(assuming that you are familiar with P/Invoke)
http://msdn.microsoft.com/library/de...wscrollbar.asp
[DllImport("user 32")]
public static extern int ShowScrollBar( IntPtr handle, int wBar, int bShow)

....
ShowScrollBar( listView.Handle , 0, 0 );

Wiktor Zychla
Nov 17 '05 #4
FlatEric
1 New Member
Do you know if there is a way of having the scrollbar bigger.
By bigger, I mean that on a Pocket PC, we could use big fingers for scrolling and not the small stylus.

Is the only way of doing this is to make my own control? :(

I am currently doing the following (which I cannot figure our how to change the size of the scrollbar without having to redraw everything):

class BuddyListView : System.Windows. Forms.ListView
{
protected override void OnPaint(System. Windows.Forms.P aintEventArgs e)
{
// ????? what should I put here???
base.OnPaint(e) ;
}
}


Any "easier" suggestion?

Thanks
May 8 '06 #5

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

Similar topics

1
812
by: paolo.riba | last post by:
Hi everybody! Could anyone know how can I syncronize a horizontal scrollbar with a listview? Actually I can only syncronize the horizontal scrollbar with the listview horizontal scrollbar, but items and subitems don't move. The code is: API declaration ' Scrollbar direction ' All these constents can be found in WinUser.h
0
403
by: Tasneem | last post by:
I am trying to replicate the functionality/display of the MS Outlook attachment box. I now know how to gather the file type icons and I'm able to use them in my listview with its' view property set to "smallicon". My problem is that when many items are displayed in the listview, BOTH the horizontal and vertical scrollbars display. Is it possible to enforce the vertical scrollbar ONLY? If so, can you please give me some idea how to go...
5
22551
by: Frank Rizzo | last post by:
I reload the items in the listview on a regular schedule (i.e. clear the listview, then load it up with fresh values). I want add a convinience to the user whereby my application remembers the position of the scrollbars after reloading the data. But I can’t figure out how to retrieve the scrollbar position (both horizontal and vertical). Neither can I figure out how to restore the state of the scrollbars. I could theoretically figure...
5
6427
by: Bernie Yaeger | last post by:
I'm using a listview in view 'list' mode, multiselect and dragdrop true. When the listview appears, it has a horizontal scrollbar (if needed) but not vertical scrollbar. How can I get it to display a vertical scrollbar? Thanks for any help. Bernie Yaeger
12
7487
by: J L | last post by:
When I fill a listview, I resize the columns to fit the data. I need to know if the data will fit vertically or if there will be a vertical scroll bar. I need to know this so I can allow for it on the overall size of the listview. My question therefore is, how can I tell if the items I have added will fit in the listview at its given height? A secondary one, just for interest sake...is there a way to determine the exact heght needed...
2
4094
by: Ben H | last post by:
Hello all I'm using a listview in my app but I want to scroll the listview programatically as I hate the look of the standard scrollbar. So, the listview is scrolled programatically using ensurevisible, ie the listview shows a maximum of 6 items and if I want to scroll down one I use the code... listview.ensurevisible(listview.TopItem.Index + 6)
1
9347
by: malpani.abhijit | last post by:
Hi, I am having a ListView component in my WinForm, when i add some images into it, it gives me a vertical scroll bar. What i want is, the horizontal scrollbar instead of vertical. Is there any way to hide the vertical scrollbars and display horizontal scrollbars?
0
2790
by: Dave Kelly | last post by:
Using .NET 2 . I am trying to get a vertical scrollbar with the ListView control, when in the List view mode. The default behaviour when the number of items exceeds the vertical length is to make an extra column, and use a horizontal scrollbar. This has 2 problems: If the text on any line exceeds the width of the control, you can't see
1
3554
by: Kimmo Laine | last post by:
Hi! I need to resize the last column in my listview control so that there won´t be horizontal scrollbar. Lets first create lv and add some items: listView1.View = View.Details;
0
9641
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
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10146
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
10080
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
9944
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
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...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3643
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.