Questions tagged [gtkentry]

GtkEntry — A single line text entry field

58 questions
16
votes
4 answers

How to make GtkTextView look like GtkEntry?

Or "How to add a visible (thin) border to GtkTextView"? Is it ever possible? Thank you in advance.
Paulo Freitas
  • 13,194
  • 14
  • 74
  • 96
14
votes
2 answers

How to capture Enter key press in GtkEntry

I am trying to capture the Enter key when it is pressed in a GtkEntry. Most of the resources I have found suggest connecting to the activate signal, but the documentation for GtkEntry states (emphasis mine): Applications should not connect to it,…
Sean Bright
  • 118,630
  • 17
  • 138
  • 146
9
votes
2 answers

Python Gtk.Entry placeholder text

i have a login-window with two gtk.Entry objects, one for username, one for password. How can i add some Ghosttext to the Entry, so there is written "Username" in the Entry but if you click inside the text dissapears.
HappyHacking
  • 878
  • 1
  • 12
  • 28
8
votes
3 answers

PyGTK Entry widget in TreeViewColumn header

How can I make a gtk.Entry widget focusable or editable within a gtk.TreeViewColumn header/title? I've tried this: # Create tree-view. treeview = gtk.TreeView() #... # Create column. renderer = gtk.CellRendererText() column =…
Uyghur Lives Matter
  • 18,820
  • 42
  • 108
  • 144
6
votes
1 answer

Styling all GtkEntry widgets with CSS using Python3 PyGObject

I'm developing a GUI with PyGObject and am trying to style all the entry widgets. From this post I get the impression that I should be able to create a CSS style that would apply to all GtkEntry objects, but for some reason it's not working for me…
lefthander
  • 163
  • 1
  • 4
6
votes
1 answer

find out which gtk widget has the current selection

I have a collection of GtkEntry widgets, some of which are editable and focusable, and some of which are not. I would like to find out which, if any, of them currently has text selected, in order to implement an Edit->Copy menu item. Is there any…
Martin DeMello
  • 11,876
  • 7
  • 49
  • 64
5
votes
3 answers

How to select text in GtkEntry

i have dialog window with GtkEntry. I want to select all text in entry right after dialog window becomes visible to user. I tried this, but its not working, i see no selection: static void OnEntryShow(GtkWidget *entry, gpointer user_data) { …
BPS
  • 1,133
  • 1
  • 17
  • 38
5
votes
2 answers

GTK+ (2.0) - signal "clicked" on GtkEntry?

I'm testing some signals with GTK+ 2.0. I'm looking for a way to get a signal emitted when I click on a GtkEntry. if (widgets_info[i].action & IG_INPUT) { widget->frame[i] = gtk_entry_new_with_max_length(MAX_INPUT_LENGTH); …
GeoffreyB
  • 1,791
  • 4
  • 20
  • 36
4
votes
1 answer

tk entry background color change in readonly mode

Hi I have a requirement where i need to create table and the cells would be readonly. But along with readonly mode, the cells need to have colored background. Now with the given options, i tried doing something like below but with no luck. Since I…
Puneet Mittal
  • 532
  • 1
  • 15
  • 24
4
votes
2 answers

Differentiate gtk.Entry icons

I'm adding two icons to a gtk.Entry in PyGTK. The icons signals are handled by the following method def entry_icon_event(self, widget, position, event) I'm trying to differentiate between the two of them:
Eldelshell
  • 6,683
  • 7
  • 44
  • 63
4
votes
3 answers

GtkWindow can only contain one widget at a time

I am using this code to retrieve and display an image from the web: class Display(object): def __init__(self): self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.connect('destroy', self.destroy) …
user1814016
  • 2,273
  • 5
  • 25
  • 28
3
votes
1 answer

How to set Placeholder text in Gtk.TextView

I have been using Gtk Entry till now which offers set_placeholder_text method to set a placeholder text in it however, looking in the documentation , I found no such method for TextView . Is there any way I can set placeholder text in Gtk Textview ?
Pawan Sharma
  • 1,842
  • 1
  • 14
  • 18
3
votes
0 answers

How to remove highlight from entry in pygtk?

i have a small GUI that i created, and when it fires up, the 'first' gtk.Entry that i have created is always highlighted (in a series of entries). essentially, here is how i create it: my_entry =…
jasonmclose
  • 1,667
  • 4
  • 22
  • 38
2
votes
1 answer

textEntry.Text output is Gtk.Entry (mono)

I try to get the text of an Entry with this code: this.myEntry.Text(); also I have tried: this.myEntry.Text.ToString(); this.myEntry.ToString(); But all what I get is Gtk.Entry and not the text from the Entry. How Can I fix this?
Jan
  • 139
  • 10
2
votes
2 answers

Restrict the number of input characters in Tk entry widget

In TCL how can I restrict the number of input characters in an entry widget? I have a TCL field in which a user can enter some text, I wish to restrict the length of the text (e.g. not more than 30 characters). Are there any options for it?
ani627
  • 5,578
  • 8
  • 39
  • 45
1
2 3 4