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 » How set read-only state to a editable column?
Re: How set read-only state to a editable column? [message #5506 is a reply to message #5505] Thu, 28 September 2006 11:58 Go to previous messageGo to previous message
nicomesas is currently offline  nicomesas
Messages: 104
Registered: September 2006
Location: Barcelona, Spain
Experienced Member
I believe that the best option is to establish two new functions in CtrlLib/ArrayCtrl.h
  bool editing:1 ; // Set to true in the constructor
  ArrayCtrl& Editing( bool b = true )                { editing = b; return *this ; }
  ArrayCtrl& NoEditing()                             { return Editing(false) ; }


and to modify the function in CtrlLib/ArrayCtrl.cpp of the following way
bool ArrayCtrl::IsEditing() const {
  if (editing) // line added
    for(int i = 0; i < column.GetCount(); i++)
      if(column[i].edit) return true;
  return false;
}


I'm testing this and work fine

Nico
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: first row strange behaviour
Next Topic: functions of HeaderCtrl [REQUEST?]
Goto Forum:
  


Current Time: Sun Aug 31 22:19:44 CEST 2025

Total time taken to generate the page: 0.05242 seconds