By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,544 Members | 2,002 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,544 IT Pros & Developers. It's quick & easy.

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

P: n/a
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 Grsse / Best regards / Votre bien devoue
Kerem Gmrkc
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.