BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ListView->GetItemAt is NULL

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Students)
View previous topic :: View next topic  
Author Message
Roger
Guest





PostPosted: Wed Mar 28, 2007 10:40 pm    Post subject: ListView->GetItemAt is NULL Reply with quote



I am using the MouseOver event with ListView as I have before but now
ListView->GetItemAt(X,Y) is always NULL and I have no idea why. I think
I am doing exactly the same thing as I have with a ListView that works,
obviously, I am not.

I would appreciate any suggestions for why ListView->GetItemAt(X,Y)
would be NULL? The ListView works fine except for this problem.

Thanks,
Roger
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Thu Mar 29, 2007 12:04 am    Post subject: Re: ListView->GetItemAt is NULL Reply with quote



"Roger" <aretae (AT) magma (DOT) ca> wrote in message
news:460a9a14$1 (AT) newsgroups (DOT) borland.com...

Quote:
I am using the MouseOver event with ListView as I have before but
now ListView->GetItemAt(X,Y) is always NULL and I have no idea why.

Please show your actual code.


Gambit
Back to top
Roger
Guest





PostPosted: Thu Mar 29, 2007 12:56 am    Post subject: Re: ListView->GetItemAt is NULL Reply with quote



Quote:

Please show your actual code.

void __fastcall TformStockTableAlerts::ListViewAlertsMouseMove(TObject *Sender,
TShiftState Shift, int X, int Y)
{
ListItem = ListViewAlerts->GetItemAt(X,Y);
if (!ListItem) return; // ListItem is always NULL
ListViewAlerts->Hint = AnsiString(((LIST_ITEM_DATA *) ListItem->Data)->sName.c_str());
}

Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Thu Mar 29, 2007 2:15 am    Post subject: Re: ListView->GetItemAt is NULL Reply with quote

"Roger" <aretae (AT) magma (DOT) ca> wrote in message
news:460aba0f$2 (AT) newsgroups (DOT) borland.com...

Quote:
void __fastcall
TformStockTableAlerts::ListViewAlertsMouseMove(TObject *Sender,
TShiftState Shift, int X, int Y)
{
ListItem = ListViewAlerts->GetItemAt(X,Y);
if (!ListItem) return; // ListItem is always NULL
ListViewAlerts->Hint = AnsiString(((LIST_ITEM_DATA *)
ListItem->Data)->sName.c_str());
}

What do you have the ViewStyle and RowSelect properties set to?


Gambit
Back to top
Roger
Guest





PostPosted: Thu Mar 29, 2007 2:54 am    Post subject: Re: ListView->GetItemAt is NULL Reply with quote

Quote:
What do you have the ViewStyle and RowSelect properties set to?


Gambit

Thanks Remy, it was the RowSelect that I'd overlooked.


Roger
Back to top
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Students) All times are GMT
Page 1 of 1

 
 


Powered by phpBB © 2001, 2006 phpBB Group
.