Re: [lazarus] TListView selection

2006-02-27 Thread George Lober

George Lober wrote:


Vincent Snijders wrote:


[EMAIL PROTECTED] wrote:


George,

This feature does not work under win32. I have attached a patch that
should fix this.



I looked at the patch I don't understand the part in 
win32wscustomlistview.pas.

You add
  SetProperty(TListView(AWinControl), lvpHideSelection, True);
and then you seem to comment out the implementation of 
TWin32WSCustomListView.SetProperty.


Is that new line actually doing anything?

Vincent

P.S. if you use // to comment blocks more can be read from the patch.



Darius, I managed to apply your patch but it doesn't do what I need it 
to do. While a grayed out selection remains on the ListViews, it's 
only visual. Logic wise, if for example I have two selected ListViews 
on a form, only one of them will be  Listview.selected <> nil, I need 
both to be <>nil.



My apologies guys, I made a mistake in my test. The patch works. When a 
couple of ListViews are selected they are both ListView.Selected <> nil.


George

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TListView selection

2006-02-27 Thread George Lober

Vincent Snijders wrote:


[EMAIL PROTECTED] wrote:


George,

This feature does not work under win32. I have attached a patch that
should fix this.



I looked at the patch I don't understand the part in 
win32wscustomlistview.pas.

You add
  SetProperty(TListView(AWinControl), lvpHideSelection, True);
and then you seem to comment out the implementation of 
TWin32WSCustomListView.SetProperty.


Is that new line actually doing anything?

Vincent

P.S. if you use // to comment blocks more can be read from the patch.



Darius, I managed to apply your patch but it doesn't do what I need it 
to do. While a grayed out selection remains on the ListViews, it's only 
visual. Logic wise, if for example I have two selected ListViews on a 
form, only one of them will be  Listview.selected <> nil, I need both to 
be <>nil.


George

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TListView selection

2006-02-27 Thread George Lober

George Lober wrote:


Micha Nelissen wrote:


George Lober wrote:


Darius Blaszijk wrote:


Maybe the patch is too old ?
  




It's patched against SVN, so I guess not ;)
 



Applying the patch in the lcl directory, the output of 'patch 
--dry-run < listview.diff' under Windows is:


--
|Index: lcl/interfaces/win32/win32wscustomlistview.inc
|===




Try applying from the lazarus directory. The path mentioned starts 
with lcl, so applying within lcl is not going to work. I also usually 
use option -p0 to patch, so it fixes path separators.




Tried doing it from the Lazarus directory but it doesn't work either. 
This is the result under Linux:


[EMAIL PROTECTED] ~/lazarus $ patch --dry-run -p0 < listview.diff
patching file lcl/comctrls.pp
Hunk #1 FAILED at 950.
1 out of 1 hunk FAILED -- saving rejects to file lcl/comctrls.pp.rej
patching file lcl/interfaces/win32/win32wscustomlistview.inc
Hunk #1 FAILED at 373.
Hunk #2 FAILED at 577.
Hunk #3 FAILED at 598.
3 out of 3 hunks FAILED -- saving rejects to file 
lcl/interfaces/win32/win32wscustomlistview.inc.rej




Micha you are right, under Windows doing it from the Lazarus directory 
does work. The trick was using the -p0 option. A small detail, but I 
think it's something that's worth adding to wiki. Why the patching 
doesn't work in Linux remains a mystery.


George

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TListView selection

2006-02-27 Thread George Lober

Micha Nelissen wrote:


George Lober wrote:


Darius Blaszijk wrote:


Maybe the patch is too old ?
  



It's patched against SVN, so I guess not ;)
 


Applying the patch in the lcl directory, the output of 'patch 
--dry-run < listview.diff' under Windows is:


--
|Index: lcl/interfaces/win32/win32wscustomlistview.inc
|===



Try applying from the lazarus directory. The path mentioned starts 
with lcl, so applying within lcl is not going to work. I also usually 
use option -p0 to patch, so it fixes path separators.




Tried doing it from the Lazarus directory but it doesn't work either. 
This is the result under Linux:


[EMAIL PROTECTED] ~/lazarus $ patch --dry-run -p0 < listview.diff
patching file lcl/comctrls.pp
Hunk #1 FAILED at 950.
1 out of 1 hunk FAILED -- saving rejects to file lcl/comctrls.pp.rej
patching file lcl/interfaces/win32/win32wscustomlistview.inc
Hunk #1 FAILED at 373.
Hunk #2 FAILED at 577.
Hunk #3 FAILED at 598.
3 out of 3 hunks FAILED -- saving rejects to file 
lcl/interfaces/win32/win32wscustomlistview.inc.rej



George

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TListView selection

2006-02-27 Thread Vincent Snijders

[EMAIL PROTECTED] wrote:

George,

This feature does not work under win32. I have attached a patch that
should fix this.



I looked at the patch I don't understand the part in win32wscustomlistview.pas.
You add
  SetProperty(TListView(AWinControl), lvpHideSelection, True);
and then you seem to comment out the implementation of 
TWin32WSCustomListView.SetProperty.


Is that new line actually doing anything?

Vincent

P.S. if you use // to comment blocks more can be read from the patch.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TListView selection

2006-02-27 Thread Micha Nelissen

George Lober wrote:

Darius Blaszijk wrote:


Maybe the patch is too old ?
  


It's patched against SVN, so I guess not ;)
 
Applying the patch in the lcl directory, the output of 'patch --dry-run 
< listview.diff' under Windows is:


--
|Index: lcl/interfaces/win32/win32wscustomlistview.inc
|===


Try applying from the lazarus directory. The path mentioned starts with 
lcl, so applying within lcl is not going to work. I also usually use 
option -p0 to patch, so it fixes path separators.


Micha

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TListView selection

2006-02-26 Thread George Lober

Darius Blaszijk wrote:


Maybe the patch is too old ?
   



It's patched against SVN, so I guess not ;)
 



Applying the patch in the lcl directory, the output of 'patch --dry-run 
< listview.diff' under Windows is:


patching file `comctrls.pp'
can't find file to patch at input line 18
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--
|Index: lcl\interfaces\win32\win32wscustomlistview.inc
|===
|--- lcl\interfaces\win32\win32wscustomlistview.inc (revision 8784)
|+++ lcl\interfaces\win32\win32wscustomlistview.inc (working copy)
--
File to patch: 
Skip this patch? [y] 
Skipping patch.

3 out of 3 hunks ignored


Under Linux:

patching file comctrls.pp
Hunk #1 FAILED at 950.
1 out of 1 hunk FAILED -- saving rejects to file comctrls.pp.rej
can't find file to patch at input line 18
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--
|Index: lcl/interfaces/win32/win32wscustomlistview.inc
|===
|--- lcl/interfaces/win32/win32wscustomlistview.inc (revision 8784)
|+++ lcl/interfaces/win32/win32wscustomlistview.inc (working copy)
--
File to patch: 
Skip this patch? [y] 
Skipping patch.
3 out of 3 hunks ignored 




Under Windows the comctrls.pp part seems to go OK, and then there is a 
problem with win32wscustomlistview.inc. Under Linux it looks similar, 
but the reference to 950 would seem to be a problem with comctrls.pp as 
well as win32wscustomlistview.inc.


What am I doing wrong ?

George

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TListView selection

2006-02-26 Thread Darius Blaszijk
> Maybe the patch is too old ?

It's patched against SVN, so I guess not ;)

Darius

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TListView selection

2006-02-26 Thread George Lober

[EMAIL PROTECTED] wrote:


It's supposed to be a patch to fix it permanently. I was working on it
some months ago but never come around to submitting the patch. If memory
serves me right there is however still an issue but I cannot remember
exactly what. Anyway it works with me.
I'm not good with widgetsets so hopefully someone with more knowledge can
asses it better.

Darius

 


[EMAIL PROTECTED] wrote:

   


George,

This feature does not work under win32. I have attached a patch that
should fix this.

Darius



 


Hi,

I have a bit of a problem. I have a form which has two TListViews. I
need to make a selection on each one and have it remained selected on
both while clicking on other components. Under Windows this does not
happen. When I click on a ListView the previously selected one
unselects. Clicking on a TEdit box also unselects the ListView. I
suppose having one thing focused at a time is desirable most of the
time, but is a problem for me in this case. This doesn't apply to Linux
where its the other way around. Any Suggestions ?

Thanks,
George



   


Thanks for the quick response. When you say 'This feature does not work
under win32', Is your patch a permanent  fix meant for Lazarus, or are
you  suggesting for me to use only ?

George

   




Hate to be a nag, but is somebody going to implement the patch ?

I tried applying it myself but couldn't do it either under Windows or 
Linux.  Maybe the patch is too old ?


Thanks,
George

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TListView selection

2006-02-21 Thread Dan
It's a bug #0001657 
(http://www.lazarus.freepascal.org/mantis/view.php?id=1657). If you have 
patch, please send it to Vincent or publish it.

Thanks DAN

- Original Message - 
From: "George Lober" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, February 21, 2006 9:14 AM
Subject: Re: [lazarus] TListView selection



[EMAIL PROTECTED] wrote:


George,

This feature does not work under win32. I have attached a patch that
should fix this.

Darius



Hi,

I have a bit of a problem. I have a form which has two TListViews. I
need to make a selection on each one and have it remained selected on
both while clicking on other components. Under Windows this does not
happen. When I click on a ListView the previously selected one
unselects. Clicking on a TEdit box also unselects the ListView. I
suppose having one thing focused at a time is desirable most of the
time, but is a problem for me in this case. This doesn't apply to Linux
where its the other way around. Any Suggestions ?

Thanks,
George




Thanks for the quick response. When you say 'This feature does not work 
under win32', Is your patch a permanent  fix meant for Lazarus, or are you 
suggesting for me to use only ?


George

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives 


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TListView selection

2006-02-21 Thread dhkblaszyk
It's supposed to be a patch to fix it permanently. I was working on it
some months ago but never come around to submitting the patch. If memory
serves me right there is however still an issue but I cannot remember
exactly what. Anyway it works with me.
I'm not good with widgetsets so hopefully someone with more knowledge can
asses it better.

Darius

> [EMAIL PROTECTED] wrote:
>
>>George,
>>
>>This feature does not work under win32. I have attached a patch that
>>should fix this.
>>
>>Darius
>>
>>
>>
>>>Hi,
>>>
>>>I have a bit of a problem. I have a form which has two TListViews. I
>>>need to make a selection on each one and have it remained selected on
>>>both while clicking on other components. Under Windows this does not
>>>happen. When I click on a ListView the previously selected one
>>>unselects. Clicking on a TEdit box also unselects the ListView. I
>>>suppose having one thing focused at a time is desirable most of the
>>>time, but is a problem for me in this case. This doesn't apply to Linux
>>>where its the other way around. Any Suggestions ?
>>>
>>>Thanks,
>>>George
>>>
>>>
>>>
>
> Thanks for the quick response. When you say 'This feature does not work
> under win32', Is your patch a permanent  fix meant for Lazarus, or are
> you  suggesting for me to use only ?
>
> George
>
> _
>  To unsubscribe: mail [EMAIL PROTECTED] with
> "unsubscribe" as the Subject
>archives at http://www.lazarus.freepascal.org/mailarchives
>


_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TListView selection

2006-02-21 Thread George Lober

[EMAIL PROTECTED] wrote:


George,

This feature does not work under win32. I have attached a patch that
should fix this.

Darius

 


Hi,

I have a bit of a problem. I have a form which has two TListViews. I
need to make a selection on each one and have it remained selected on
both while clicking on other components. Under Windows this does not
happen. When I click on a ListView the previously selected one
unselects. Clicking on a TEdit box also unselects the ListView. I
suppose having one thing focused at a time is desirable most of the
time, but is a problem for me in this case. This doesn't apply to Linux
where its the other way around. Any Suggestions ?

Thanks,
George

   



Thanks for the quick response. When you say 'This feature does not work 
under win32', Is your patch a permanent  fix meant for Lazarus, or are 
you  suggesting for me to use only ?


George

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] TListView selection

2006-02-20 Thread George Lober

Hi,

I have a bit of a problem. I have a form which has two TListViews. I 
need to make a selection on each one and have it remained selected on 
both while clicking on other components. Under Windows this does not 
happen. When I click on a ListView the previously selected one 
unselects. Clicking on a TEdit box also unselects the ListView. I 
suppose having one thing focused at a time is desirable most of the 
time, but is a problem for me in this case. This doesn't apply to Linux 
where its the other way around. Any Suggestions ?


Thanks,
George




_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives