gtk#

GTK# in Visual Studio 2010

折月煮酒 提交于 2019-12-03 02:31:36
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 Windows Forms application and removed references to the windows forms stuff and adding references for

Deploy GTK Sharp applications to Windows without installing GTK#

江枫思渺然 提交于 2019-12-03 01:58:42
问题 I am developing a GTK# mono application under openSuse, but I am interested in deploying it for all three platforms (Windows 7, Snow Leopard and as many Linux distributions as I can test on). Deploying on Linux is not a problem as GTK# comes with the mono libraries, but for Windows I would not like to force the users to install GTK#. Is there a way to embed GTK# in the application, or at least integrate its installation with the installation of my program? 回答1: You may deploy GTK#

Gtk# Clipboard Copy/Cut/Paste files

梦想的初衷 提交于 2019-12-02 00:49:14
问题 How can I use Gtk# to copy, cut, and paste files to the clipboard. Every example I have seen only shows text being put into the clipboard. If anyone has an example I'd appreciate it. 回答1: if your application is running on Gnome/Unity you can use "x-special/gnome-copied-files" target type to move/copy files over clipboard. Once file copied you should be able to paste it using file manager and vice versa. Below is an example of a window class which does this: using System; using System.IO;

Mono Development Environment on Win 7 64bit gmcs hello.cs -pkg:gtk-sharp-2.0 can't find files

故事扮演 提交于 2019-12-01 23:44:43
问题 I downloaded Mono and installed it on Win 7 64bit I went to this site to follow the instructions http://www.mono-project.com/Mono_Basics I opened up the mono command prompt and compiled and ran the console hello world then I tried to compile the windowed hello world example with gmcs hello.cs -pkg:gtk-sharp-2.0 and I get this C:\Code\NoControl\Mono>gmcs hello.cs -pkg:gtk-sharp-2.0 error CS0006: Metadata file `C:/PROGRA\~2/MONO-2\~1.8/lib/mono/gtk-sharp-2.0/pango-sharp.dll' could not be found

Gtk theme in GTK# (Windows)

混江龙づ霸主 提交于 2019-12-01 18:00:11
I'm trying to change the theme in GTK# ( OS: Windows, IDE: Xamarin ). But I get next issues: I was able to find only one theme which correctly render, it is "Orta". All was well, except for lags and freezes . Here is my code: string Resource_File = "Orta\\gtk-2.0\\gtkrc"; Application.Init (); Gtk.Rc.AddDefaultFile (Resource_File); Gtk.Rc.Parse (Resource_File); MainWindow win = new MainWindow (); win.Show (); Application.Run (); When I changing the size of the Paned or clicking on button I get GUI freezes ( I already asked about this ). This problem occurs only when using this theme, with the

How to set the value of a Gtk.ComboBox?

我们两清 提交于 2019-12-01 08:59:52
All I can figure out is something to do with the ComboBox.GetEnumerator or something like that. I would like to do something like: System.Collections.IEnumerator e = this.task_difficulty_combobox.GetEnumerator(); while (e.MoveNext()) { if (e.ToString() == this.task.Difficulty.ToString()) { Gtk.TreeIter i = (Gtk.TreeIter)e.Current; this.task_difficulty_combobox.SetActiveIter(i); break; } } However, This doesn't work. kdt The reason your code doesn't work is that the "items in the combobox" are actually the cell renderers packed into it for displaying columns of data. To get at the actual data,

How to set the value of a Gtk.ComboBox?

旧街凉风 提交于 2019-12-01 06:40:36
问题 All I can figure out is something to do with the ComboBox.GetEnumerator or something like that. I would like to do something like: System.Collections.IEnumerator e = this.task_difficulty_combobox.GetEnumerator(); while (e.MoveNext()) { if (e.ToString() == this.task.Difficulty.ToString()) { Gtk.TreeIter i = (Gtk.TreeIter)e.Current; this.task_difficulty_combobox.SetActiveIter(i); break; } } However, This doesn't work. 回答1: The reason your code doesn't work is that the "items in the combobox"

Crossplatform threading and GTK#, not working (properly)?

﹥>﹥吖頭↗ 提交于 2019-12-01 04:40:21
问题 I'm trying to make a crossplatform C# application using C#, mono/GTK# on Linux and .NET/GTK# on Windows, however the startup sequence seems to need to be slightly different under the two platforms: Under Linux: public static void Main (string[] args) { Gdk.Threads.Init (); // etc... Under Windows: public static void Main (string[] args) { Glib.Thread.Init (); Gdk.Threads.Init (); // etc... Both require it to be done that way: Windows complains about g_thread_init() not being called with the

mkbundle and GTK#

我的未来我决定 提交于 2019-12-01 01:48:14
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. The system cannot find the file specified. File name: 'gtk-sharp' at System.AppDomain.Load (System

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

我怕爱的太早我们不能终老 提交于 2019-11-30 17:23:12
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. 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 explicitly transfered to Gtk). When application developers need to have threads update some element of the