473,386 Members | 1,841 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,386 software developers and data experts.

ListView OwnerDraw and the last three periods in a column problem,...

Hi,

i know how to work with the owner draw mode in
the ListView-Class, but how do i draw the last three
dots in a column if the text exceeds the columns width?
To make it clear, i am talking about a ListViewItem's
Subitem and the case, the text in the Subitems is longer
than the columns width. This is the standard beahviour
in the non-ownerdraw mode, but you have to implement
it in the ownerdraw mode by yourself. How can i do that?
Because at the current state, the text of the subitems are
overlapping and "smudging" on the ListView,..

Thanks in advance,...

Regards

Kerem

--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Latest Project: http://www.codeplex.com/restarts
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."

Sep 9 '08 #1
2 2306
Its a little hazy for me as its been a while.
but the DrawString on the graphics object takes a rectangle and a
stringformat in its parameters so you pass the rectangle you want to clip by,
plus set the stringformat clipping to be on word, or letter and it should
show the elipsis (...)

Let me know if this isnt enough and I'll dig out an example.
--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"Kerem Gümrükcü" wrote:
Hi,

i know how to work with the owner draw mode in
the ListView-Class, but how do i draw the last three
dots in a column if the text exceeds the columns width?
To make it clear, i am talking about a ListViewItem's
Subitem and the case, the text in the Subitems is longer
than the columns width. This is the standard beahviour
in the non-ownerdraw mode, but you have to implement
it in the ownerdraw mode by yourself. How can i do that?
Because at the current state, the text of the subitems are
overlapping and "smudging" on the ListView,..

Thanks in advance,...

Regards

Kerem

--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Latest Project: http://www.codeplex.com/restarts
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."

Sep 9 '08 #2
Hi Ciaran,

thanks for your reply, i found out, that i made some
wrong calculations for the rect i had to draw, because
i am drawing several things into a listview including
controls and images, so the complete Drawing is very
difficult and i made at very cricitc line a fundamental
calculation mistake, but i found it and fixed it. Thanks
for your reply, there is no need for an example anymore,...

Take care,...

Regards

Kerem
--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Latest Project: http://www.codeplex.com/restarts
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."
"Ciaran O''Donnell" <Ci************@discussions.microsoft.comschrieb im
Newsbeitrag news:6D**********************************@microsof t.com...
Its a little hazy for me as its been a while.
but the DrawString on the graphics object takes a rectangle and a
stringformat in its parameters so you pass the rectangle you want to clip
by,
plus set the stringformat clipping to be on word, or letter and it should
show the elipsis (...)

Let me know if this isnt enough and I'll dig out an example.
--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"Kerem Gümrükcü" wrote:
>Hi,

i know how to work with the owner draw mode in
the ListView-Class, but how do i draw the last three
dots in a column if the text exceeds the columns width?
To make it clear, i am talking about a ListViewItem's
Subitem and the case, the text in the Subitems is longer
than the columns width. This is the standard beahviour
in the non-ownerdraw mode, but you have to implement
it in the ownerdraw mode by yourself. How can i do that?
Because at the current state, the text of the subitems are
overlapping and "smudging" on the ListView,..

Thanks in advance,...

Regards

Kerem

--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Latest Project: http://www.codeplex.com/restarts
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."

Sep 9 '08 #3

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

Similar topics

6
by: VM | last post by:
How can I fill up a listview with text file contents? My listview has two columns and the first column fills up with a while loop: while (myString != null) { myString = sr.Readline();...
0
by: Sérgio Almeida | last post by:
Greetings I have a problem using listview control. Well, I belive that this is not realy a problem, but it's consuming me precious time. Here is the scenario (an example of my problem). I...
9
by: Devron Blatchford | last post by:
Hi there, Just wondering if I change the back and fore colour of a listview item when the mouse hovers over it? I want to overide the default windows colour. Can someone please tell me how to...
12
by: Dennis | last post by:
I have a form which has a ListView control named ListView1 added at design time. When I add items using the following code, they don't appear in the list view. However, if I create a ListView...
0
by: Brian Henry | last post by:
Ok whats going on here... got a couple problems... this is relevant now to this group since .NET 2.0 is finally RTM 1) draws really slow when making it a large form (resizing speed is jerky) to...
1
by: tmda | last post by:
I'm using OwnerDraw for some customization in my ListView - adding color to item backgrounds. I'm using the ListView specifically for it's OwnerDraw capability. I originally was using the...
7
by: > Adrian | last post by:
How do I change the ListView Header Color? If you know how to do it, please give a code example. Adrian. (I placed this question in another newsgroup by error.)
1
by: GruBByMaster | last post by:
Hello I want to create a custom column header that i will later insert in a ListView. I just want to change to background color and font color in the header. Is this possible? I seen some...
1
by: James | last post by:
Hi All, I have an ownerdraw ListView control. I'm trying to use an ownerdrawn ListView control to draw and display images in the second column of a listview which is set to detail view. I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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...
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...

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.