Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Retrieving column index like a row
Retrieving column index like a row [message #40484] Wed, 07 August 2013 13:31 Go to previous message
crydev is currently offline  crydev
Messages: 151
Registered: October 2012
Location: Netherlands
Experienced Member
Hello,

I am using the following code to retrieve the data from the currently selected row in an ArrayCtrl.

const int row = this->mUserAddressList.GetCursor();
if (row >= 0 && mUserAddressList.GetCount() > 0)
{
     // The selected row is not -1, so no error will occur when data retrieval is attempted.
}


I am wondering, is it possible to also retrieve the column the cursor is in? I would like to implement different behavior between different columns.

P.S.

I bug I have using this code though, is that since always one row is selected if you click anywhere in the ArrayCtrl, even by clicking outside of a row, still one will be selected. This only applies to a situation where there are less rows then available draw space. Is there a way to fix this? I can imagine I am using the wrong code to retrieve row indexes.

Thanks in advance!

[Updated on: Wed, 07 August 2013 13:32]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic: [BUG] GridCtrl uses wrong sorting icon order.
Next Topic: ArrayCtrl.AsQtf bug?
Goto Forum:
  


Current Time: Mon Apr 29 12:04:35 CEST 2024

Total time taken to generate the page: 0.02349 seconds