CListCtrl Changing the row height

Hello,

I'm trying to change the the row height of a CListCtrl ( not the total 
length of the listCtrl) i.e. I want the text to be displayed with the same 
font size but the height of this text (item) should be increased. This way on 
a touch screen the distance between the items is large enough to select an 
item in the ClistCtrl. 

Currently the clistctrl has one column, and each row data has a small icon 
and text beside it. 

Do you have any suggestions.

Thanks,

Regards,
Suresh
0
newbieemp (3)
1/11/2008 9:17:01 PM
vc.mfc 33608 articles. 0 followers. Follow

4 Replies
1620 Views

Similar Articles

[PageSpeed] 43

I think the only way to do it is to use a custom draw list control.

This article should explain how to do it.

http://www.codeproject.com/KB/combobox/changerowheight.aspx

AliR.


"newbie_emp" <newbieemp@discussions.microsoft.com> wrote in message 
news:E7DD82B3-5F2C-4074-96C2-98FB5ABA864F@microsoft.com...
> Hello,
>
> I'm trying to change the the row height of a CListCtrl ( not the total
> length of the listCtrl) i.e. I want the text to be displayed with the same
> font size but the height of this text (item) should be increased. This way 
> on
> a touch screen the distance between the items is large enough to select an
> item in the ClistCtrl.
>
> Currently the clistctrl has one column, and each row data has a small icon
> and text beside it.
>
> Do you have any suggestions.
>
> Thanks,
>
> Regards,
> Suresh 


0
AliR3470 (3236)
1/11/2008 9:49:04 PM
The simplest way to change the row height in a CListCtrl is to display an 
icon with the desired height.

All other ways that I know of require significant programming (such as owner 
draw, which is often too much work).


"newbie_emp" <newbieemp@discussions.microsoft.com> wrote in message 
news:E7DD82B3-5F2C-4074-96C2-98FB5ABA864F@microsoft.com...
> Hello,
>
> I'm trying to change the the row height of a CListCtrl ( not the total
> length of the listCtrl) i.e. I want the text to be displayed with the same
> font size but the height of this text (item) should be increased. This way 
> on
> a touch screen the distance between the items is large enough to select an
> item in the ClistCtrl.
>
> Currently the clistctrl has one column, and each row data has a small icon
> and text beside it.
>
> Do you have any suggestions.
>
> Thanks,
>
> Regards,
> Suresh 


0
1/11/2008 9:50:57 PM
Thank  you Michael ,

This indirect  was really easy to implement.

Regards,
Suresh

"Michael K. O'Neill" wrote:

> The simplest way to change the row height in a CListCtrl is to display an 
> icon with the desired height.
> 
> All other ways that I know of require significant programming (such as owner 
> draw, which is often too much work).
> 
> 
> "newbie_emp" <newbieemp@discussions.microsoft.com> wrote in message 
> news:E7DD82B3-5F2C-4074-96C2-98FB5ABA864F@microsoft.com...
> > Hello,
> >
> > I'm trying to change the the row height of a CListCtrl ( not the total
> > length of the listCtrl) i.e. I want the text to be displayed with the same
> > font size but the height of this text (item) should be increased. This way 
> > on
> > a touch screen the distance between the items is large enough to select an
> > item in the ClistCtrl.
> >
> > Currently the clistctrl has one column, and each row data has a small icon
> > and text beside it.
> >
> > Do you have any suggestions.
> >
> > Thanks,
> >
> > Regards,
> > Suresh 
> 
> 
> 
0
newbieemp (3)
1/11/2008 11:16:00 PM
Hi Ali,

Thank you. I see that this would be the approach if I did not have an Icon 
in my ClistCtrl. Fortunately I could use the image resize and things worked 
for me.

Regards,
Suresh Kumar.

"AliR (VC++ MVP)" wrote:

> I think the only way to do it is to use a custom draw list control.
> 
> This article should explain how to do it.
> 
> http://www.codeproject.com/KB/combobox/changerowheight.aspx
> 
> AliR.
> 
> 
> "newbie_emp" <newbieemp@discussions.microsoft.com> wrote in message 
> news:E7DD82B3-5F2C-4074-96C2-98FB5ABA864F@microsoft.com...
> > Hello,
> >
> > I'm trying to change the the row height of a CListCtrl ( not the total
> > length of the listCtrl) i.e. I want the text to be displayed with the same
> > font size but the height of this text (item) should be increased. This way 
> > on
> > a touch screen the distance between the items is large enough to select an
> > item in the ClistCtrl.
> >
> > Currently the clistctrl has one column, and each row data has a small icon
> > and text beside it.
> >
> > Do you have any suggestions.
> >
> > Thanks,
> >
> > Regards,
> > Suresh 
> 
> 
> 
0
newbieemp (3)
1/11/2008 11:17:00 PM
Reply:

Similar Artilces: