PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: David Martin on May 20, 2004, 05:35:04 PM

Title: ListView with columns request
Post by: David Martin on May 20, 2004, 05:35:04 PM
Paul,

When you use a ListView with columns, only the item in the first column is selectable & highlighted.  The below code can overcome this shortcoming ... thought you might be able to implement it in Window Styles if LVS_REPORT is chosen.  This code came off from MSDN.

tmpResult& = SendMessage(HWND_FORM1_LISTVIEW1, %LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)
tmpResult& = tmpResult& Or %LVS_EX_FULLROWSELECT
SendMessage(HWND_FORM1_LISTVIEW1, %LVM_SETEXTENDEDLISTVIEWSTYLE, 0, ByVal tmpResult&)

Thanks,

David
Title: ListView with columns request
Post by: TechSupport on May 20, 2004, 10:43:04 PM
Thanks David,

I use the same code in FireFly itself. For example, there is a ListView in the "Open" dialog that displays a list of Most Recently Used projects. That has full row select as well.

As you probably already know, you can also insert your code into the WM_CREATE message and it should work.
Title: ListView with columns request
Post by: David Martin on May 21, 2004, 12:23:52 AM
Yeah, that's what I did.  Just thought I would mention this.

David
Title: ListView with columns request
Post by: TechSupport on May 21, 2004, 11:31:48 AM
Hi David,

I built upon your suggestion and added all 17 extended ListView styles to the FireFly PropertyList. Now it is extremely easy to set any of those styles.
Title: ListView with columns request
Post by: michael puckett on May 21, 2004, 01:25:55 PM
Excellent, thank you! :)
Title: ListView with columns request
Post by: TechSupport on May 21, 2004, 03:10:32 PM
Just for clarification, this change will be in the next update (version 1.04), which I hope to have out very soon.
Title: ListView with columns request
Post by: David Martin on May 31, 2004, 08:09:28 PM
Paul,

I downloaded and installed 1.04 but do not see a %LVS_EX_FULLROWSELECT ( or similar ) option for for a ListView control Window Style.

What I am missing?

Thanks,

David
Title: ListView with columns request
Post by: TechSupport on May 31, 2004, 08:24:54 PM
Hi David,

You will need to delete your existing control and add a new ListView control. Simply give your new control the same name that you gave your old control and you should be in business.
Title: ListView with columns request
Post by: David Martin on June 01, 2004, 12:14:22 AM
Tried that ... and tried adding a ListView to a completely different form.  But still do not see a LVS_EX_FULLROWSELECT ( or similar ) option.
Title: ListView with columns request
Post by: TechSupport on June 01, 2004, 12:30:57 AM
Sorry David, I wasn't very clear.  :oops:

All of the extended LVS styles have been given separate properties in the PropertyList. Therefore, they are not contained in the WindowStyles.

There should be a separate property simply called "FullRowSelect". Set that property to "True". That should do the trick.

Please let me know if it works or does not work.
Title: ListView with columns request
Post by: David Martin on June 01, 2004, 12:37:06 AM
Man, taking three days off must have gotten to me.  I looked for that originally but did not think to after adding a new ListView control ... works fine.

Thanks,

David