mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 16:10:48 +00:00
Implement NSMatrix -setEnabled:. It enables or disables all cells as
in Cocoa. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31823 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f107c5484a
commit
eeb4161156
2 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-01-03 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSMatrix.m (-setEnabled:): Implement method. It enables
|
||||
or disables all cells as in Cocoa.
|
||||
|
||||
2011-01-01 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSTextAttachment.m (-trackMouse:inRect:ofView:...): Call
|
||||
|
|
|
@ -3162,6 +3162,21 @@ static SEL getSel;
|
|||
return _errorAction;
|
||||
}
|
||||
|
||||
/**<p> Enables or disables all cells of the receiver. </p>
|
||||
*/
|
||||
- (void) setEnabled: (BOOL)flag
|
||||
{
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < _numRows; i++)
|
||||
{
|
||||
for (j = 0; j < _numCols; j++)
|
||||
{
|
||||
[_cells[i][j] setEnabled: flag];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**<p> Sets a flag to indicate whether the matrix should permit empty
|
||||
selections or should force one or mor cells to be selected at all times.
|
||||
</p><p>See Also: -allowsEmptySelection</p>
|
||||
|
|
Loading…
Reference in a new issue