List Info

Thread: Re: NSTableColumn resizing problem




Re: NSTableColumn resizing problem
country flaguser name
Germany
2008-04-24 14:55:42
Hi Fred,

>> I find it rather difficult to resize columns in a
tableview. One has 
>> to
>> really hit the thin line separating two column for
being able to do so
>> which seems to be only one pixel wide. How can we
make this more
>> tolerant? On Mac OSX this even works if the
mouseDown event   3-4 
>> pixels
>> to the left or right of the column separator line?
>>
>
> I think the code for this is in [NSTableHeaverView
mouseDown:]. Could
> you please experiment with that and report back
suitable pixel values?

Thanks a lot for this hint. I finally found time to look
into the 
issue. I am using the value 4 at the marked locations now.

...
  if ([_tableView allowsColumnResizing])
	{
	  /* Start resizing if the mouse is down on the bounds of a
column. */
	
	  if (location.x >= NSMaxX (rect) - 4) // <-------
BUST
	    {
	      if (columnIndex != ([_tableView numberOfColumns]))
		{
		  _resizedColumn = columnIndex;
		}
	      else
		{
		  NSLog("ohoh");
		}
	    }
	  else if (location.x <= NSMinX (rect) + 4) //
<------- BUST
	    {
	      if (columnIndex > 0)
		{
		  _resizedColumn = columnIndex - 1;
		}
	    }
	}
...

This makes me a happy camper! I recommend these values for
the public 
tree.

Regards,

   Andreas



_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustepgnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )