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 » RemoveLast() crash when cell selected
RemoveLast() crash when cell selected [message #12509] Tue, 06 November 2007 20:17 Go to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hi Daniel,

I use the same grids to show gridded data from different objects depending on the selection within a droplist. These objects have a different number of rows so when I move from one object to another I RemoveLast() to fit the rows to the current object like this.

m_grid.RemoveLast(m_grid.GetCount()-1);

Which is fine and should always work. However, when a cell is selected, it crashes and I suspect this is something you want to know about. There does not appear to be an Unselect() method by which to stop this crash. Any ideas?


Cheers,

Nick

p.s. will come back on the other thread when I have a test case.

[Updated on: Tue, 06 November 2007 20:21]

Report message to a moderator

Re: RemoveLast() crash when cell selected [message #12513 is a reply to message #12509] Tue, 06 November 2007 22:35 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Thank you! I'll check it tomorrow.
Re: RemoveLast() crash when cell selected [message #12516 is a reply to message #12513] Tue, 06 November 2007 23:36 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Well, I tried to repeat the bug.. Everything was fine. I'm afraid I need this test case.
Re: RemoveLast() crash when cell selected [message #12592 is a reply to message #12516] Fri, 09 November 2007 19:02 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hey Daniel,

I included a simple test case. Select a cell then press the button and that should do it Smile

I have coded around the problem in any case so am not waiting for a solution on this one.

As far as suggestions go, what I would love right now would be the ability to split the grid so that I can keep the first column where it is and scroll all the other columns and to keep the first row where it is and scroll the other rows.

Oh and one more question please: how do I disable the searching function? I tried grid.Searching(false) but that doesn't do it.

Cheers,

Nick

  • Attachment: testgrid.zip
    (Size: 2.09KB, Downloaded 278 times)
Re: RemoveLast() crash when cell selected [message #12597 is a reply to message #12592] Fri, 09 November 2007 22:55 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Thanx for the test case. You didn't tell me that cell must be in edit mode Smile. Anyway, bug is fixed now. Try the attached package.
As for serching - it's fixed now too.
  • Attachment: GridCtrl.7z
    (Size: 68.99KB, Downloaded 249 times)
Re: RemoveLast() crash when cell selected [message #12601 is a reply to message #12597] Sat, 10 November 2007 03:02 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hey, I can come up with unreasonable demands almost as fast as you can meet them Smile

How about another couple of functions:

GridCtrl::FitToContents()
ItemRect::FitToContents()
or
GridCtrl::FitToContents(int col);

? That would be very sweet Razz

Nick


Re: RemoveLast() crash when cell selected [message #12800 is a reply to message #12597] Sat, 17 November 2007 17:05 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
I just downloaded dev11 (trying not to apply patches as I dont want to go out of sync with colleagues) but I still can't disable searching. What is the command please? Is the fix in dev11?

Thanks,

Nick

EDIT: ah ok its not in dev11.

[Updated on: Sat, 17 November 2007 17:31]

Report message to a moderator

Re: RemoveLast() crash when cell selected [message #12802 is a reply to message #12800] Sat, 17 November 2007 19:49 Go to previous message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Well. Seraching(false) should disable immediate searching (as well bulit-in toolbar searching). It works for me Smile But of course post test case. Maybe there's something I'm not aware of.
Previous Topic: Row numbering inconsistency
Next Topic: Howto: Row Aggregation for ArrayCtrl
Goto Forum:
  


Current Time: Wed Apr 24 01:21:35 CEST 2024

Total time taken to generate the page: 0.02072 seconds