Board index » cppbuilder » Re: TListView

Re: TListView


2003-07-22 08:30:16 PM
cppbuilder59
See response to your identical post on newsgroup:
borland.public.cppbuilder.vcl.components.using
keith
 
 

Re:Re: TListView

There is a strange behaviour at the onSelectItem event handler, it seems
trigger this event 2 times when I select an item in the TListView.
I just put a showmessage in the event handler and run the program. Click the
item, the message box pop up 2 times.
 

Re:Re: TListView

Try
If Selected then
ShowMessage('Now');
"Alan" < XXXX@XXXXX.COM >wrote in message
Quote
There is a strange behaviour at the onSelectItem event handler, it seems
trigger this event 2 times when I select an item in the TListView.

I just put a showmessage in the event handler and run the program. Click
the
item, the message box pop up 2 times.


 

{smallsort}

Re:Re: TListView

"John Leavey" < XXXX@XXXXX.COM >wrote in message
Quote
Try logging calls to your event handler in some way that won't
alter focus, such as writing to a memo object or log file on disk.
I often use an incrementing count and display it as the form caption.
Saves on clutter...
--
Regards,
Chris Luck.
 

Re:Re: TListView

Hi All
I need to get the text written in a subitem of the selected row in a
TListView
like if I have the items Name/Tel/Fax
and we considered the Name to be the ListItem
and Tel, Fax are subitems, how to get the value in the 'Fax' column for the
row the user select
thanks in advance
 

Re:Re: TListView

Dre,
Quote
I need to get the text written in a subitem of the selected row in a
TListView

Questions on using VCL components should be asked in
VCL.COMPONENTS.USING
Borland newsgroups are described at:
info.borland.com/newsgroups
Andrue Cope
[Bicester, UK]
 

Re:Re: TListView

"oLiVeS" <olives3#Remove#@earthlink.net>wrote in message
Quote
TListItem* SubItem = ListView1->Items->Item[ListView1->Selected->Index];
The Selected property is already a TListItem, there is no need to go through
the Items[] property for the selected item:
TListItem* SubItem = ListView1->Selected;
Gambit
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/03
 

Re:Re: TListView

I'd like to override the way the TListView header and scrollbars are painted
within TmyListView, nothing major. This is the first time i'm trying
something like this.
S
 

Re:Re: TListView

"Shadavar" < XXXX@XXXXX.COM >wrote in message
3f5202ed$ XXXX@XXXXX.COM ...
Quote
I'd like to override the way the TListView header and scrollbars are
painted within TmyListView, nothing major. This is the first time i'm
trying something like this.
You can't. TListView is a wrapper for Windows' standard list view control,
and as such is non-modifiable.
Cheers,
Ignacio
 

Re:Re: TListView

"Sam S. Firouz" < XXXX@XXXXX.COM >wrote in message
Quote
1 - how can I find the the X and Y pozition of mouse (reletive
to the TListView itself) so I can pass them to GetItemAt() function.
Use the Win32 API GetCursorPos() function or the VCL TMouse::CursorPos
property, and then pass the resulting coordinates to the ListView's
ScreenToClient() method.
Quote
2 - What is the best way to find which column (ViewStyle =
vsReport) was double clicked on?
ListView has an OnColumnClick event, but it is for single-clicks, not
double-clicks. ListView controls in general do not issue notifications for
double-clicking on a column header, so there is nothing for the VCL to wrap
in that regard.
Gambit
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03
 

Re:Re: TListView

When you use a TListView there is an option to allow editing
of an item. It only allows editing of the item in the first column.
Is there any way to allow editing of all items.
Thanks for any advice.
James
 

Re:Re: TListView

"forums.borland.com" <james-a-diskwave-d-commerce>wrote in message
Quote
When you use a TListView there is an option to allow editing
of an item. It only allows editing of the item in the first column.

Is there any way to allow editing of all items.
Have a look at the following code I posted to CodeCentral awhile back, it
does exactly that:
How to use the Build-in Editor of TListView to Edit SubItems
codecentral.borland.com/codecentral/ccweb.exe/listing
Gambit
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03
 

Re:Re: TListView

I have a TlistView control in my form and I'd like to add some columns by
code and set some properties like: a column with fields in bold, a colum
that has fields in check mode, a colum not editable.... How can I manage
all?
Thanks, Chri.
 

Re:Re: TListView

I have a TlistView control in my form and I'd like to add some columns by
code and set some properties like: a column with fields in bold, a colum
that has fields in check mode, a colum not editable.... How can I manage
all?
Thanks, Chri
 

Re:Re: TListView

Chri wrote:
Quote
I have a TlistView control in my form and I'd like to add some columns by
code and set some properties like: a column with fields in bold, a colum
that has fields in check mode, a colum not editable.... How can I manage
all?
I'd go with a third party component. Check my web site for some,
looking especially at the TMS Software and LMD offerings.
--
Jonathan Arnold C/C++/CBuilder Keen Advice:
www.keen.com/categories/categorylist_expand.asp
Comprehensive C++Builder link site:
www.buddydog.org/C++Builder/c++builder.html