BBC BASIC for Windows
« ListView controls »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:58pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: ListView controls  (Read 648 times)
Matt
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 210
xx ListView controls
« Thread started on: Nov 22nd, 2010, 06:21am »

The program I'm writing uses a List View. The font, however, is a little too small, but try as I might, I cannot find a way to increase itfrom within the program . Any help, please?

Matt
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: ListView controls
« Reply #1 on: Nov 22nd, 2010, 08:17am »

on Nov 22nd, 2010, 06:21am, Matt wrote:
The program I'm writing uses a List View. The font, however, is a little too small, but try as I might, I cannot find a way to increase it from within the program .

Have you tried the method described on the Wiki:

http://bb4w.wikispaces.com/Changing+the+font+of+a+control

According to MSDN it should work: "When you create a list-view control, you can also send it a WM_SETFONT message to set the font to be used for the text. You should send this message before inserting any items":

http://msdn.microsoft.com/en-us/library/bb774736.aspx

If you find that it doesn't work, ask again.

Richard.
User IP Logged

Matt
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: ListView controls
« Reply #2 on: Nov 23rd, 2010, 05:59am »

Thanks Richard.

It does exactly what it says on the tin.

Matt
User IP Logged

Matt
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: ListView controls
« Reply #3 on: Nov 27th, 2010, 05:43am »

I'm getting myself in a right muddle here, bogging myself down with window controls.

I've got a columned list view and I want to select a cell with the mouse, recognise which cell it is (i.e. which row and which column), right click and select an action from the context menu. I've spent two days rumaging around msdn, but all I'm doing is confusing myself.

Help, please.

Matt

PS, how can I click anywhere on a row and have the whole row highlighted rather than just the fist column? (This is not important, just wondering.)
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: ListView controls
« Reply #4 on: Nov 27th, 2010, 08:45am »

on Nov 27th, 2010, 05:43am, Matt wrote:
I've got a columned list view and I want to select a cell with the mouse, recognise which cell it is (i.e. which row and which column), right click and select an action from the context menu.

The first thing to note is that in a regular 'columned' (LVS_REPORT) List View you can only select items (rows), not cells. To discover which item(s) is/are selected you can iterate through all the items and test the LVIS_SELECTED flag in each one. n.b. if you want to disable the ability to select multiple items, use the LVS_SINGLESEL style.

To respond to a right-click you will need to intercept the WM_NOTIFY message carrying the NM_RCLICK notification. This can only be done using assembly language so is an advanced topic!

Quote:
PS, how can I click anywhere on a row and have the whole row highlighted rather than just the fist column?

Set the LVS_EX_FULLROWSELECT extended style (LVM_SETEXTENDEDLISTVIEWSTYLE message).

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls