[Mono-osx] NSTableView issues and Graphic issues
Jon Lipsky
jon.lipsky at elevenworks.com
Wed Apr 25 14:58:05 UTC 2012
Hi Tomas,
To color rows of a NSTableView, you can implement your own "Cell" class to do the custom drawing. You can then assign that cell to one of your columns in your tableview like this:
column0 = new NSTableColumn (new NSNumber(0));
cell0 = new MyCustomCell();
column0.DataCell = cell0;
tableView.AddColumn (column0);
To draw a string, the easiest solution would be to use one of the methods on NSString:
var myString = new NSString("my string");
myString.DrawString(...);
That will draw the string to the current graphics context.
Best Regards,
Jon...
On Apr 25, 2012, at 10:43 AM, Tomas Trescak wrote:
> Dears
>
> I am reposting this question as I have not solved my problem and noo
> one seems to respond to this problem.
> If you don't know the direct solution can you help me with workaround?
>
> #1: How to color rows of NSTableView?
>
> I tries subscribing to event WillDisplayCell but this event is not
> raised and subscribing to it breaks table behavior, so that rows are
> no longer selectable.
>
> #2: How to draw text using graphics
>
> I tried method from GraphicContext ShowText() but this methods does
> not display anything
>
> Any help is greatly appreciated
>
> Tomas
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-osx/attachments/20120425/2f630966/attachment.html>
More information about the Mono-osx
mailing list