Hi Guys,
Pretty straight foward question, I have a GtkEntry widget that i want to set to be editable. I know the function i should use is:
gtk_editable_set_editable
But i dont know how to make it take a GtkEntry widget as an arguement
Can anyone help me?
Regards
Paul
UPDATE:
Ok, so here is the code im using:
GtkWidget *TextEnt...
I'm now doing it in a very ugly way by manually including all the required path(the gtk bundle is at D:/Tools/gtk+-bundle_2.20.0-20100406_win32):
include_directories(D:/Tools/gtk+-bundle_2.20.0-20100406_win32/include/gtk-2.0 D:/Tools/gtk+-bundle_2.20.0-20100406_win32/include/glib-2.0 D:/Tools/gtk+-bundle_2.20.0-20100406_win32/lib/glib-2...
The question is simply in the title, if I have a function I want to use via a g_timeout_add(), but this function is a class member function, is there any way I can use it with g_timeout_add()?
...
I want to be able to change the label of a GtkButton after the widget has been shown
char *ButtonStance == "Connect";
GtkWidget *EntryButton = gtk_button_new_with_label(ButtonStance);
gtk_box_pack_start(GTK_BOX(ButtonVbox), EntryButton, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(TopVbox), ButtonVbox, TRUE, TRUE, 0);
gtk_widget_show_a...
it seems that Ruby GTK apps are unable to run in nongraphical environment.. while python apps are able to.
oversimplified examples (even without the gtk main loop), demonstrating this behavior:
gtktest.py:
#! /usr/bin/python
import gtk
print('the end')
gtktest.rb:
#! /usr/bin/ruby
require "gtk2"
puts('the end')
X window environme...
Hi, where can i download the gnope installer to have the php-gtk2 in my machine ?, according to the online manual, it is found at gnope.org, but I am being redirected to this tradebit website,
...
Hello,
I have c/gtk+ application and GList which filled three elements, when i try to run following code with gdb:
if (g_list_length(mw->img_list) > 0)
printf(">0");
else
printf("<0");
i see:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb73c4700 (LWP 7936)]
IA__g_list_length (list=0x6e6920) at g...
So I'm beginning to wonder how leaky the gnome2 libraries for ruby1.8.6 are.
#!/usr/bin/env ruby
require 'gtk2'
while true
sleep 0.1
pixbuf = Gdk::PixbufLoader.new
pixbuf = nil
end
this leaks about 16kb/sec according to watch -n 1 ps -o rss -p <process id>
This is compounded if you start trying to write a chunk of large chun...
How can I force the Tab to focus the element I want, is it possible to give my software a list of elements to cycle focus ?
I remember once using a property called tabindex, but I can't find it anymore.
Maybe, preventing Tab to focus an element could also work ?
...
Is it possible to make a ComboBox searchable ? If yes, how ?
I want to be able, when the ComboBox is active and a letter is typed with the keyboard, to select the first item beginning with this letter inside the ComboBox and so on with the next letters.
The is the same functionality of a ComboBox inside a webpage, for example.
I can't...
When I try to scroll down to the end of my TreeView, which is inside a ScrolledWindow, it doesn't scroll where it should but one or two lines before.
I tried several methods and they all provide the same behavior :
self.wTree.get_widget("tree_last_log").scroll_to_cell((self.number_results-1,))
# or
self.wTree.get_widget("tree_last_log...
I have a GtkLabel and a GtkDrawingArea within a VBox, I want to center the label relative to a X-coordinate of the GtkDrawingArea (which is below of the label in the VBox), how can I tell GTK to center that label relative to that "anchor" point ? This point should be the center of the label.
...
I run GTK2 applications under linux, on my apple computer.
I would like to know how to modify the global accelerator settings.
In particular, I would like to copy paste using Command-c Command-v instead of Ctrl-c Ctrl-v.
Has anybody done this? Is there a config file somehwere that contains the accelerator assignments?
...
Hi there. I have a desktop application written in Ruby that is using GTK2. It's just a small test application to play with GTK2, but I'm having problems achieving what I want to do. Is there any way using GTK2 to get at the titlebar (apart from setting the title), specifically to either add a button to it (beside the min/max/etc, B in th...
I am using Glade-3 to build a suite of Gtk applications.
The applications are supposed to have a common look-and-feel, and we have decided on a common "frame" that all apps will share, that includes a menu bar, toolbar, status-bar(s), a vertical panel - and a space in the middle that will be filled out by each application.
This common ...
I have the following PHP GTK code located in C:\gtk
<?php
if (!class_exists('gtk')) {
die("Please load the php-gtk2 module in your php.ini\r\n");
}
$wnd = new GtkWindow();
$wnd->set_title('Background');
$wnd->set_resizable(false);
$wnd->set_position(GTK_WIN_POS_CENTER);
$wnd->connect_simple('destroy', array('gtk', 'main_quit'));
...
I'm trying to make this button change background when you click it and this is what I have:
<?php
if (!class_exists('gtk')) {
die("Please load the php-gtk2 module in your php.ini\r\n");
}
function loc(){
return dirname(__FILE__);
};
$wnd = new GtkWindow();
$wnd->set_title('Picture Viewer');
$wnd->set_resizable(false);
$wnd->set_...
There are .get_property, .set_property, .get_properties and .set_properties available in the wnck.Window (WnckWindow) class, but what are the available properties one can use here?
...
GTK+ 2.x has the follow states: NORMAL, PRELIGHT, ACTIVE, INSENSITIVE, SELECTED for use in GTK themes and I can do things like...
bg[NORMAL] = "#f6f6f6"
.. to change background color when in NORMAL state.
Also, I can change the background image of a button (when the mouse is over it) by changing the PRELIGHT state image.
But I was n...