 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Roger Guest
|
Posted: Wed Mar 28, 2007 10:40 pm Post subject: ListView->GetItemAt is NULL |
|
|
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
|
Posted: Thu Mar 29, 2007 12:04 am Post subject: Re: ListView->GetItemAt is NULL |
|
|
"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
|
Posted: Thu Mar 29, 2007 12:56 am Post subject: Re: ListView->GetItemAt is NULL |
|
|
| 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
|
Posted: Thu Mar 29, 2007 2:15 am Post subject: Re: ListView->GetItemAt is NULL |
|
|
"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
|
Posted: Thu Mar 29, 2007 2:54 am Post subject: Re: ListView->GetItemAt is NULL |
|
|
| 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 |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|