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 » Ctrls<>() Callback / Disable some rows
Re: Ctrls<>() Callback / Disable some rows [message #10076 is a reply to message #10075] Tue, 19 June 2007 10:58 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

kcabobert wrote on Mon, 18 June 2007 17:54

I think I have found another glitch... possibly in my code, but I don't think so.

I have two columns, one with checkboxes, one with names. Sometimes when I press the space bar is checks the PREVIOUSLY selected rows checkbox, not the currently selected row.

This behaviour is spuradic, and as I type this I can not reproduce it. Encountered this before?

It seems like cursor pos is not changed in some rare situations. Could you post your test case? And what version of grid do you use?
Re: Ctrls<>() Callback / Disable some rows [message #10079 is a reply to message #9991] Tue, 19 June 2007 15:05 Go to previous messageGo to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
I am using the version bundled with UPP-2007.1, I am not exactly sure what the version number is. Judging from the changelog I would say 2007.1rc3?

I will try to find a some simple test code / instructions to replicate as I finish updating my code to use GridCtrl.

As I recall it is when selections are made using a combination of the mouse (to enter GridCtrl), then using <enter> and <space> to make selections. As I said, I do not recall the specific sequence.


Now that a few little bugs have been ironed out it seems like GridCtrl will accomplish what I need. Nice work!!

Robert
Re: Ctrls<>() Callback / Disable some rows [message #10080 is a reply to message #9991] Tue, 19 June 2007 15:24 Go to previous messageGo to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
Except one (hopefully easy) thing: how can I disable one row? Or, at the minimum, one cell which I just inserted?

Verbal example: I have a gridctrl with a column of check boxes and a column of names, when I populate (as I Add(sql result vector)) the grid I need to disable some checkboxes. I tried calling NoEditable and NoClickable with no luck.


Is there an easy way to achieve this?

Thanks,
Robert
Re: Ctrls<>() Callback / Disable some rows [message #10081 is a reply to message #10080] Tue, 19 June 2007 15:56 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Quote:

Verbal example: I have a gridctrl with a column of check boxes and a column of names, when I populate (as I Add(sql result vector)) the grid I need to disable some checkboxes. I tried calling NoEditable and NoClickable with no luck.

Generally NoEditable should prevent creating embeded control. However it works well before the window with grid is displayed. Later GridCtrl::Add(..) call SyncCtrls() (method responisble for creating/updating embeded controls) immediately after creating row. You have to call Add() before NoEditable() which does not update controls' positions and you still see them able to be edited. So as a workaround make SyncCtrls() in GridCtrl class public and call it after adding rows and making some of them uneditable. I'll try to find correct solution to this problem before new dev release (Add()/AddRow() call SyncCtrls and I would like to avoid clling it a second time in NoEditable() somehow).
Re: Ctrls<>() Callback / Disable some rows [message #10082 is a reply to message #10079] Tue, 19 June 2007 15:58 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Quote:

I am using the version bundled with UPP-2007.1, I am not exactly sure what the version number is. Judging from the changelog I would say 2007.1rc3?

There were some important changes/bugs fixed after it. So I will make current snapshot of GridCtrl available on this forum today. Please check it.
Re: Ctrls<>() Callback / Disable some rows [message #10083 is a reply to message #9991] Tue, 19 June 2007 17:13 Go to previous messageGo to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
I know calling SyncCtrls in NoEditable is less than ideal... but is something similar not the 'cleanest' solution?

What about creating some type of 'stripped' SyncCtrls that only affects the row being set to NoEditable?
Re: Ctrls<>() Callback / Disable some rows [message #10084 is a reply to message #9991] Tue, 19 June 2007 17:44 Go to previous messageGo to next message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
This still does not quite look right. The Ctrl is not getting totally disabled (it still displays and is sometimes able to be checked). I think the SyncCtrls function needs a small tweak. I think if the row is set to NoEditable the Ctrl should be disabled. What are your thoughts on that?

[Updated on: Tue, 19 June 2007 17:45]

Report message to a moderator

Re: Ctrls<>() Callback / Disable some rows [message #10086 is a reply to message #10084] Tue, 19 June 2007 22:01 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kcabobert, this thread starts to be confusing, dealing with ArrayCtrl and GridCtrl without specification.

Please at least add "ArrayCtrl" or "GridCtrl" somewhere in your post Smile

Or start a new one...
Re: Ctrls<>() Callback / Disable some rows [message #10097 is a reply to message #9991] Wed, 20 June 2007 00:41 Go to previous message
kcabobert is currently offline  kcabobert
Messages: 51
Registered: January 2007
Location: USA
Member
Yeah, I thought about that... it sort of took a turn for the confusing.

Basically the thread focuses on GridCtrl after about the fourth post, with occasional references to ArrayCtrl after.
Previous Topic: GridCtrl align text in column
Next Topic: GridCtrl - Child Ctrl, selected row, focus issue
Goto Forum:
  


Current Time: Mon Apr 29 07:30:06 CEST 2024

Total time taken to generate the page: 0.03410 seconds