SFML community forums
Bindings - other languages => DotNet => Topic started by: Wibbs on March 20, 2010, 09:22:12 pm
-
Hi all,
I'm trying to implement a tree-list view contained within a scrollable pane, but I can't work out the best way of displaying a small part of the overall tree. I need to be able to clip it horizontally if any of the strings are too long, and vertically if the list has too many items for the size of the display pane, the idea being to implement scrollbars to navigate the list.
I would appreciate any pointers as to how to approach this.
Thanks,
Wibbs
-
This is not possible, but a simple workaround is to use the glScissor OpenGL function.
This kind of feature should be added soon to SFML 2.
-
Hmmm, you're talking about someone with absolutely no experience with OpenGL at all here... :wink:
Also, how do you access opengl calls through .net with sfml, as it doesn't seem to work in the same way as the tutorial shows for c++?
-
You have to use Tao.OpenGL (google for it) to access OpenGL in .Net.
To enable clipping you just have two functions to call:
Gl.glEnable(Gl.GL_SCISSOR_TEST); // call glDisable to disable
Gl.glScissor(left, top, width, height);