Is it possible to stop user from interacting /editing/ changing data/
changing look with a list view.
Gerry. 7 1398
<ge***********@ gmail.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.com.. . Is it possible to stop user from interacting /editing/ changing data/ changing look with a list view.
You'd probably be better off posting again in the user interface group:
microsoft.publi c.win32.program mer.ui
That said, there usually are at least two ways to do something like this.
One is to disable the control - check the docs for EnableWindow().
The other is to subclass the control - possibly subverting the handling of
keyboard and mouse input.
Regards,
Will
> Is it possible to stop user from interacting /editing/ changing data/ changing look with a list view.
Hi Gerry,
Assuming you mean the .NET ListView control, you can simply set the Enabled
property to false.
that will prevent the user from interacting with it in any way.
--
Kind regards,
Bruno. br************* *********@hotma il.com
Remove only "_nos_pam"
Hi Bruno,
I have tried the enabled property ... how ever the items in the grid
change colour to a different colour.
<ge***********@ gmail.com> wrote in message
news:11******** **************@ u72g2000cwu.goo glegroups.com.. . I have tried the enabled property ... how ever the items in the grid change colour to a different colour.
That's a visual cue to the user informing him that the control is disabled.
Regards,
Will
I want the listview control to "visually look the same" as an enabled
control,
But yet the use can not do stuff like edtit cells or resize
gridcolumns etc etc...
<ge***********@ gmail.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.com.. . I want the listview control to "visually look the same" as an enabled control, But yet the use can not do stuff like edtit cells or resize gridcolumns etc etc...
I understand. As I said, using the native API, you'd accomplish that by
subclassing the control.
Sorry, but I don't know what your .Net options are.
Regards,
Will ge***********@g mail.com wrote: I want the listview control to "visually look the same" as an enabled control, But yet the use can not do stuff like edtit cells or resize gridcolumns etc etc...
In .NET, set LabelEdit = false to prevent editing of item captions. I
don't think you can disable header column resizing, but you can disable
header click, and hide the header columns altogether, with the
HeaderStyle property. You can try to handle the MouseDown event, and if
the mouse is on top of a column, just discard the window message.
Actually I don't believe it's a good idea to disable header resizing --
your customers will hate you for that. It's like disabling the scrolling
of items. What if a caption is too long and the user has a wide screen
monitor, or they use a larger than normal font? You gotta allow such
basic operations.
Ultimately you can do anything by painting to the screen directly. Start
with a Panel control and paint whatever you wish on top of it.
Tom This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jon Ripley |
last post by:
Using VB6 (for two weeks!)
I could get a ListBox search working perfectly but with a ListView it has
completely stumped me. I've not found any previous posts that have helped :(
The user enters a string into a text box (txtStreet) and as they type any
matching entry in the listview (lsvStreets) is highlighted and made visible.
The search highlights the first item starting with the text in txtStreet.
The listview contains 6,000 rows...
|
by: SlantyOD |
last post by:
Hi All,
I'm trying to tie two ListViews together so that when the user scrolls
one, the other stays 'in sync'. Since there are no OnScroll events,
and the scroll bar position is unavailable, I've been forced to create
my own ListView class and override WndProc. In this I've caught all
instances of WH_VScroll and WH_HScroll, and then I can pass this info
onto the second ListView by using the User32.dll method SendMessage.
This all works...
|
by: Gary Brown |
last post by:
Hi,
How do you programmatically scroll a ListView control horizontally?
(The same effect as if the user used the horizontal scroll bar,)
I've done it in C++/MFC, but can't find the means in C#. Autoscroll
is enabled.
Also, I need to know if the user scrolls the ListView horizontally.
Thanks,
|
by: youngie |
last post by:
I've got a listview on a form in report style. It's populated with 40
item. I want to prevent the used clicking on some items, and if the
user clicks on one of these items I want the selection to revert back
to the old selection, hideselection property if false, listview is
single select.
In the OnSelectedChange() handler I test to see if the newly selected
item is a selectable one, if it's not, I try to change the selection
like so.
|
by: Steph. |
last post by:
I have a List view displaying data in Detail mode with several columns.
How I can get the column index the user clicked on ? (when user click on an item inside the ListView, not on a column hearder..)
Thanks for any help !
| |
by: aviad |
last post by:
I am writing a Form application
I need it to fit both resolution of 1600*1200 and 800*600
(and any other resolution that might jump in)
the application is meant for regular PCs
another question is what the difference between the Dock and Anchor
properties?
i tried to use them (mutual exclusive of course) but with no success
|
by: dvestal |
last post by:
I have a ListView with checkboxes. I want to remove items when the
checkboxes are unchecked, but to do so yields an
ArgumentOutOfRangeException. Is there an easy way to get around this?
A simple program that illustrates the exception is below:
using System;
using System.Windows.Forms;
namespace WindowsApplication1
|
by: Lord Zoltar |
last post by:
Hi,
I've got a list view that displays a series of images. I'd like to be
able to draw a divider across the list view to divide the images into
groups. Ideally, I'd have a group name, with a line underneath it that
spans the ListView. How could this be done? I tried using an image as
the divider, but it forced the divider image to be the same size as
the image size used for the ImageList that stores the images for the
ListView.
|
by: witpo |
last post by:
Hi,
I would like to display all listview items in one row with scroll bar below it – instead of multiple rows and scroll bar on the right. Someone told me that I can achieve it using LVM_SETITEMPOSITION message.
According to my knowledge code below should set position for each item added to listView control. There are two ways of doing it - we can use MessageWindow.SendMessage from Microsoft.WindowsCE.Forms or use DllImport and SendMessage....
|
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...
|
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...
| |
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,...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |