gtk#

How to prevent auto-selection of radio buttons

馋奶兔 提交于 2019-12-23 09:26:16
问题 When adding an instance of the Gtk# RadioButton class to a GUI, it is automatically checked ("activated") as the first member of its radio button group. For Gtk , this has been discussed to some extent in another question, with the main point of the selected answer being that users expect one radio button to be selected at all times . I do not dispute that. However, I am automatically generating my user interface in a way so each radio button is linked to a data model, but none of the radio

GTK# mouse event in drawing area

瘦欲@ 提交于 2019-12-23 07:28:06
问题 I have a DrawingArea which I would like to received mouse events. From the tutorials I have found that the KeyPressEvent will also catch mouse events. However for the following code the handler is never called. static void Main () { Application.Init (); Gtk.Window w = new Gtk.Window (""); DrawingArea a = new CairoGraphic (); a.KeyPressEvent += KeyPressHandler; w.Add(a); w.Resize (500, 500); w.DeleteEvent += close_window; w.ShowAll (); Application.Run (); } private static void KeyPressHandler

Gstreamer-sharp running on Linux

不问归期 提交于 2019-12-23 05:40:10
问题 since I'm currently working on a gstreamer binding for my project and got the information, that gstreamer-sharp 0.99.x is only working with glib-sharp 2.99.x, I thought it a good idea to create a test project. So I downloaded the addin for monodevelop named "GTK# 3 Simple Project Template" and compiled it -> worked. Now I added the gstreamer-sharp 0.99 dll I compiled before and added the following code: Gst.Application.Init(); Element music = Parse.Launch("playbin uri=\"file:////media

GTK UI Looks different when running from bundle and when running from Xamarin Studio

假如想象 提交于 2019-12-23 04:24:33
问题 I have C# App using Mono framework and GTK for UI.When i run it from Xamarin Studio it looks like this I have bundled Mono and GTK into a standalone bundle.When running from it it looks different. Which one looks more native to the OSX Platform? If its the first one,then how can i get the same look and feel in the bundled App. 回答1: GTK 2 Theming Options: Use the default system theme Per user theming via ~/.gtkrc Per application theming via GTK api Per application theming via environment var

How to load a GTK Sharp theme on MS Windows

半腔热情 提交于 2019-12-21 20:38:44
问题 I'm programming a GTK Sharp (v2.12) application using Xamarin Studio 5.4 on MS Windows. The installed Mono version is 3.2.3 (but I'm using the .Net tool chain to compile, because Xamarin doesn't allow me to compile using the Mono toolchain). The case is that when I run the application from the Xamarin Studio or using Mono, then I have a relatively nice look & feel, but when I run the application using .Net (doing double click on the executable) then the look & feel is horrible. I've tried to

How to call JavaScript from Mono's WebKitSharp?

我怕爱的太早我们不能终老 提交于 2019-12-21 05:47:09
问题 I tried this code. All works, but I can't find a way to reach the DOM or to call JavaScript from it. Any ideas how to do that? This is using GTK# and WebKitSharp. EDIT: Also I need to get the result. 回答1: webView.ExecuteScript("alert('An alert from C#!');"); will do the trick. Getting the results back is another challange though: WebKit.DOMDocument is not implemented in webkit-sharp, so you can't access the DOM. There are a few workarounds, this is what we normally do: Have a invisible frame

GTK# in Visual Studio 2010

痴心易碎 提交于 2019-12-20 12:15:27
问题 I've been trying all day to get GTK# working in Visual Studio 2010 on Windows Server 2008 R2 x64 so that I can start writing nice cross-platform GUI applications, but I'm somewhat new to C# and I'm having a world of trouble. I installed the latest Mono for Windows which includes GTK#. I also installed a Mono 2.10.8 profile to be the target framework of my project loosely following the guide from here: http://erictummers.wordpress.com/2012/01/25/target-mono-from-visual-studio/ I created a new

LibVLC.NET in GTK#

。_饼干妹妹 提交于 2019-12-20 03:46:29
问题 I use LibVLC.NET wrapper in GTK#. And I have already played video using this example: LibVLCLibrary library = LibVLCLibrary.Load(null); IntPtr inst, mp, m; inst = library.libvlc_new(); // Load the VLC engine m = library.libvlc_media_new_location(inst, "path/to/your/file"); // Create a new item mp = library.libvlc_media_player_new_from_media(m); // Create a media player playing environement library.libvlc_media_release(m); // No need to keep the media now library.libvlc_media_player_play(mp);

mkbundle and GTK#

独自空忆成欢 提交于 2019-12-19 04:57:28
问题 I'm trying to use mkbundle so that I can distribute a GTK# application without users needing to install .NET/Mono or GTK#. I've successfully bundled an application which uses winforms, but for some reason when I do the same with a GTK# application it won't work. This is what I get out of cygwin: $ mkbundle --deps a.exe OS is: Windows Sources: 1 Auto-dependencies: True Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'gtk-sharp' or one of its dependencies.

How do I access GUI (GTK) from multi threads?

笑着哭i 提交于 2019-12-18 19:06:26
问题 I have a worker thread spawned from a GUI (for GUI performance), how do I access GUI, such as spawning new windows/widgets from the thread itself? I tried using delegates but it doesn't seem to be working. Any ideas? Possibly examples? Thank you. 回答1: According to their Best Practices: Gtk# is not a thread-safe toolkit, which means that only one thread at a time can safely invoke methods on Gtk#. This thread is typically the thread executing the main loop (which is when control has been