Changing row height in a CListCtrl

Hello,

I'm trying to change the row height of a list control by means of a 
slider. Currently, we're doing that by changing the font height. This 
works perfectly, except for one thing: The font actually changes as well 
(d'uh). For the items itself it's not really a huge issue, I'm using 
custom draw and can set the font height to a "fixed" value. But I can't 
do that for the headers.

Is there perhaps another way to change the row height of a list control, 
or is changing the font height the only way to do it?

Thanks,

-- 
Maarten Kools
___________________________________________
Van Gennep - Media Automation Consulting bv
Burg. Stramanweg 105
1101 AA Amsterdam
The Netherlands

Phone:  +31-20-697 6029
Fax:    +31-20-697 2249
E-mail: mkools@vangennep.nl
WWW:    http://www.vangennep.nl
WWW:    http://www.vangennep.com
___________________________________________
0
mkools (57)
8/2/2004 3:28:27 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
971 Views

Similar Articles

[PageSpeed] 29

You can also tell the ListCtrl to use an icon in the first column, and change
the size of the icon/bitmap that you tell it to use.  You don't have to use the
icon in any rows, but it will cause the ListCtrl to set the row height to
accomodate the icon/bitmap.

The aspect ratio does not need to be maintained by the way, you could tell it to
use a bitmap that is 1 pixel wide by 30 pixels tall to make a large row height.

Not sure how it might work dynamically.

Ther is probably a better way... 

On Mon, 02 Aug 2004 17:28:27 +0200, "M. Kools" <mkools@vangennep.nl> wrote:

>Hello,
>
>I'm trying to change the row height of a list control by means of a 
>slider. Currently, we're doing that by changing the font height. This 
>works perfectly, except for one thing: The font actually changes as well 
>(d'uh). For the items itself it's not really a huge issue, I'm using 
>custom draw and can set the font height to a "fixed" value. But I can't 
>do that for the headers.
>
>Is there perhaps another way to change the row height of a list control, 
>or is changing the font height the only way to do it?
>
>Thanks,

0
none89 (807)
8/3/2004 4:59:05 PM
I found a slightly different way. The WM_MEASUREITEM message. The only 
problem with this is it has to be owner drawn, and I'm using custom draw 
and draw per cell.

Mike Stephenson wrote:

> You can also tell the ListCtrl to use an icon in the first column, and change
> the size of the icon/bitmap that you tell it to use.  You don't have to use the
> icon in any rows, but it will cause the ListCtrl to set the row height to
> accomodate the icon/bitmap.
> 
> The aspect ratio does not need to be maintained by the way, you could tell it to
> use a bitmap that is 1 pixel wide by 30 pixels tall to make a large row height.
> 
> Not sure how it might work dynamically.
> 
> Ther is probably a better way... 
> 
> On Mon, 02 Aug 2004 17:28:27 +0200, "M. Kools" <mkools@vangennep.nl> wrote:
> 
> 
>>Hello,
>>
>>I'm trying to change the row height of a list control by means of a 
>>slider. Currently, we're doing that by changing the font height. This 
>>works perfectly, except for one thing: The font actually changes as well 
>>(d'uh). For the items itself it's not really a huge issue, I'm using 
>>custom draw and can set the font height to a "fixed" value. But I can't 
>>do that for the headers.
>>
>>Is there perhaps another way to change the row height of a list control, 
>>or is changing the font height the only way to do it?
>>
>>Thanks,
> 
> 

-- 
Maarten Kools
___________________________________________
Van Gennep - Media Automation Consulting bv
Burg. Stramanweg 105
1101 AA Amsterdam
The Netherlands

Phone:  +31-20-697 6029
Fax:    +31-20-697 2249
E-mail: mkools@vangennep.nl
WWW:    http://www.vangennep.nl
WWW:    http://www.vangennep.com
___________________________________________
0
mkools (57)
8/4/2004 1:37:28 PM
Reply:

Similar Artilces:

how do i change dates on my calendar and keep my pics
Publisher doesn't support this. You would need to do it manually. -- Brian Kvalheim Microsoft Publisher MVP http://www.publishermvps.com ~pay it forward~ This posting is provided "AS IS" with no warranties, and confers no rights. "Bob T" <Bob T@discussions.microsoft.com> wrote in message news:68671977-F71B-444F-AE72-801D2B359FEE@microsoft.com... > ...

Row Not Found at the Subscriber
http://sanssql.blogspot.com/2010/05/row-not-found-at-subscriber-replication.html Regards, Sandesh Segu http://sanssql.blogspot.com/ ...

conditional formatting of row based on cell
I want to apply conditional formatting to a whole row based on the contents of one cell in that row. For example, if cell L2 contains the word 'sport', i want the whole of row 2 to be shaded. I'm guessing this is pretty simple, but seem to be having a bit of a mental blockage. Any suggestions would be appreciated. Thanks :) formula is =$l$2="sport" "Katherine" <katherine@katherine.com> wrote in message news:107b01c372ef$4ec59e30$a101280a@phx.gbl... > > I want to apply conditional formatting to a whole row > based on the contents of one...

Tracking Changes #4
Hi All, Just wondered if anyone could help me. I was going through the Track changes exercise, which is great to produce a report of who has change what and when etc. However I then found out that if I was to change my username in Tools>Options>General, in excel that track changes goes to pot and tracks the new username, so in effect I could disguise myself as someone else and change areas of the spreadsheet without successfully being tracked! Can this be stopped without using network administration rights to stop people going in and changing the username? Many Thanks Amanda ...

Selecting rows from various sheets #4
Cheers Fran -- sha ----------------------------------------------------------------------- shav's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1198 View this thread: http://www.excelforum.com/showthread.php?threadid=26665 ...

Automatcally Hiding Rows in Excel 2000 #2
Is there a way of automatically hiding rows in Excel 2000 based on a rule (ie if there is no data in a row, we want to hide that row without doing it manually)? We have a couple of ideas which involve VB code which reacts to data within that row but if anyone has done this before or knows of a way to do it, that would be great. Thanks in advance! Tom Starr http://groups.google.com/groups?threadm=3F625B17.4BF93224%40msn.com Was a reply you got to your first post. Tom Starr wrote: > > Is there a way of automatically hiding rows in Excel 2000 based on a rule > (ie if there is no...

Re: Is there a way to HIDE a row based on a value of a cell ?
Hi Reddance, Try instead: Sub Tester() Dim rng As Range Dim i As Long If LCase(Sheets("Ctrl").Range("A1").Value) _ <> "yes" Then Exit Sub End If With Sheets("ToPrint") For i = 5 To .UsedRange.Rows.Count Step 2 If Not rng Is Nothing Then Set rng = Union(rng, .Cells(i, "A")) Else Set rng = .Cells(i, "A") End If Next i End With If Not rng Is Nothing Then rng.EntireRow.Hidden = True End If ...

Changing my functions to use subtotals?
I have 2 functions that are calculating my data correctly, except now I need to consider the autofilter. I figure using subtotal is the way to go if I want to disregard filtered out rows. Also, I plan on moving my data to another sheet, so it will need to reference the current sheet, which is AAT_Raw_Data. Finally, the # of rows of data will vary, but I don't think it will ever be over 10,000. I'm using Excel 2003, so I think there's an issue with using something like "A:A" in my formulas. Can someone help me change these to add in a subtotal and take into...

Word always asks to save changes to the template
For my work we have made templates for different letters we have to send. Our application (VB6) calls those templates when we want to send a letter. Using the code we follow a few steps : - open word - open a new document using our template - save the document (.doc) on a server - sometimes print the document - sometimes immediately close the document (when we don't want users to modify the document afterwards) When they closed the document the users always get 2 questions : - save changes to template for the letter - save changes to normal.dot I already found a solution to avoid the q...

Inserting rows slow on large report
I have a large report I maintain with 3 data tabs and 2 report tabs, 1 for top 10 customers, about 400 rows, and another for all other customers, about 4000 rows. Every month I have to update it for any new customer/product combinations. I have optimized the formulas to the best of my abilities and gotten a full recalc time down from 3 min to 30 sec, which is acceptable. My biggest problem now is that every time I need to add a row (or delete one for that matter) it takes about 15 seconds (on the 4k row report, adding to the top 10 customers report takes 3-5 seconds), per row....

Updating 20k+ rows from Excel to access. vbscript? VBA? SQL?
Any suggestions? Some of these rows only need a few columns updated, and others need all of them updated. If possible if say row 800 column 'S' is filled in the access DB but is blank on the excel spreadsheet, if possible i like to keep the existing data in access and over right it with a blank cell. The spreadsheet is a export of the access DB, changes were made/merged from other spreadsheets so the Unique ID is the same and in column A. A script suggestions to complete this? Thanks :) dim dbe dim db dim ssql set dbe = createobj("dao.dbengine.36") set db = dbe.openda...

Insert Row Under current row (with formulas/formatting)
I've got a sheet that gets appended to regularly but have to do a lot of fiddling to make sure the formatting is correct, calculated fields get added and chart series ranges collect all the data every time I add a new row. The insert (row) command seems to take care of all of this but it inserts the empty row above the current row. As I'm always appending data to the sheet, I would prefer this to be below the current row. I've tried adding a dummy row under all the data containing the formulas and formatting I need but unfortunately I get formula errors and it screws up my chart....

2 existing spreadsheets show 1st line rather than header row to sort ...
(XL2003) This is odd, I haven't seen this ever before. I was working on spreadsheets yesterday for a mail merge. Two had headers rows. I cleaned up both documents, put print area and then tried to sort. In both cases, what came up in the sort was the first row below the header where one always sees the actual titles of the header row when one selects the Header Row radio button under "My List Has" in the "Sort" box. I fiddled and fiddled a bit and managed to get one of the workbooks to display the sort properly by the header row titles - without figuring out what ...

how to deal with duplicate data rows
I need to interface with a program that generates a .csv file with row of data. It generates 2 or more rows for each instance uniquely identified by the docket/page combination Example: last first bank trustee docket page smith john ny bank (blank field) 12235 8907 (blank field) (blank field) cal western 12235 8907 smith janet ny bank (blank field) 12235 8907 I need to consolidate all three lines into one row by concating field that contain different data (first name column) and columns with blan spaces to look like the ...

series name change
How can I change the name of "series" ? I added to the chart with straight line by highlight two numeric columns. I can create lines but the legend show series 3,4,5,6 !! Thanks Daniel On Tue, 14 Aug 2007, in microsoft.public.excel.charting, Daniel <Daniel@discussions.microsoft.com> said: >How can I change the name of "series" ? > >I added to the chart with straight line by highlight two numeric columns. >I can create lines but the legend show series 3,4,5,6 !! Choose menu Chart.. Source Data.. Series, and there will be a box for series name. You can ...

more than 65, 500 rows
Is there a product that allows more than 65k rows? ...

how to automatically delete non-contiguous rows
Is it possible to define a large data field then delete non-contiguous rows, like every fifth row, without having to delete each row one at a time? Hi One way to insert a column with a formula and use SpecialCells(xlCellTypeBlanks) to delete the rows Test it on a copy of your workbook Sub test1() Application.ScreenUpdating = False Dim myRows As Long Range("A1").EntireColumn.Insert myRows = ActiveSheet.UsedRange.Rows.Count With Range(Cells(1, 1), Cells(myRows, 1)) .FormulaR1C1 = "=IF(MOD(ROW(),5)=1,""Keep"","""&...

Changing a formula's result to text
I have a pretty simple worksheet that lists the date in column A. In column B, I have a formula that converts the date in Column A to the proper day of week. When I put it in a pivot table, it treats column B as an individual date, not the proper DOW. I attempted to copy/paste special/values into a new column, but it doesn't change it to the DOW, it leaves it as the date. I am trying to get Excel to permanently change the cells in column B to say "Tuesday" instead of 4/19/07. Does that make sense? All of the conventional answers don't seem to work for me. Any help? It...

Adding a total row to a chart data table
I have the following data in a chart Week 1 2 3 4 5 6 7 8 Data1 1 5 7 6 1 6 7 6 Data2 3 4 5 7 9 4 6 6 Is it possible to have the data table show a totals row? I.E: Totals 4 9 12 13 10 10 13 12 Thanks in advance, John You can't include the total in the data table. As a workaround, you could embed the chart on a worksheet, and display the data below it. Tushar Mehta has instructions on his web site: http://tushar-mehta.com/excel/newsgroups/data_table/index.htm John Ortt wrote: > I have the following data in a chart > > Week 1 2 3 4 5 6 7 8 > Data1 1 5 7 6 1 6 7 6...

CListCtrl InsertColumn(0, "L", LVCFMT_RIGHT)?
Hi, The CListCtrl doesn't appear to like the first column to be aligned non-left. Why? By inserting the first column with InsertColumn(1, "L", LVCFMT_RIGHT), it does show it right aligned. But what if there are columns already? Should I delete and reinsert them all? "Olaf van der Spek" <Olaf@XCC.TMFWeb.NL> wrote in message news:%23K2rr8LLFHA.2716@TK2MSFTNGP15.phx.gbl... > Hi, > > The CListCtrl doesn't appear to like the first column to be aligned > non-left. Why? > By inserting the first column with InsertColumn(1, "L", LVCFMT_R...

Changed Server Numbers when Travel
I just had my outlook 2003AOL server numbers changed for no reason while travelling. Switched them back for my pop account and the would work, when shut down and then restart they would change from the correct to another set of numbers. Is there a way to stop these server numbers from changing while I travel. Thanks. What is a 'server number'? The IP address? -- Diane Poremsky [MVP - Outlook] Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlook/ol2007/ Outlook Tips by email: dailytips-subscribe-request@lists.outl...

Change PST?
I installed a new Outlook (XP) and have my old backup PST file on a disk. I want the default data location to be of my choosing. I assume I copy that data where I want it but how do I import it? "bobnewman backup.pst.pst". I am totally confused, both by the lack of documentation (that I can find) and the backup file name. I hope someone can help. Bob I found it! Thanks anyway. Bob "Bob Newman" <bobnewman@att.net> wrote in message news:vD%7d.2900$TY2.272@lakeread04... > I installed a new Outlook (XP) and have my old backup PST file on a disk. I > want t...

Automatically adjust table row height in Publisher
Is it possible to have Publisher automatically adjust row height when working in a table? No... -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "cdavetype" <cdavetype@discussions.microsoft.com> wrote in message news:AAADE565-0540-4135-B7EF-D6DB4AD01B91@microsoft.com... > Is it possible to have Publisher automatically adjust row height when working > in a table? ...

How do I change the elements displayed in the message list
How do I change the elements displayed in the message list. For example, to list "To" or "From" edit the view - to change just one folder, click on the row of field names and choose custom. To make all folders the same see http://www.outlook-tips.net/howto/grouping.htm -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlook/ol2007/ Outlook Tips: http://www.outlook-tips...

Change the mail Subject
When I choose to send my SOP Blank Invoice Form to a mail recipient (pdf), information is populating the subject line and body of my e-mail by default. Specifically the name of the report is populating the subject line. Is there a way to change this? I would rather see the Invoice number or customer name populating that field. Thank you Nancy, Out of the box, no. When you print a report to screen it loses all knowledge of what report it is (or where it came from). That's why when you then send to pdf the best the window can do is use the title of the output window as the s...