GtkEntry Cursor

More
25 Feb 2015 01:45 #56278 by BigJohnT
BigJohnT created the topic: GtkEntry Cursor
I have a GtkEntry on a tab embedded into Axis but the cursor does not show up when you click on the entry box. It's there and you can type but you have no clue your there. I've looked through the options in glade and don't see anything. Is this another tcl focus issue?

JT
More
25 Feb 2015 01:56 #56279 by mhaberler
mhaberler replied the topic: GtkEntry Cursor
try running the glade window outside Axis, ie not as an embedded tab

if the problem goes away, the answer is yes

-m
More
25 Feb 2015 21:38 - 25 Feb 2015 21:40 #56290 by BigJohnT
BigJohnT replied the topic: GtkEntry Cursor
Well it is correct the missing cursor is the tcl problem. I ran it stand alone and the cursor shows up normally. However the axis-remote works to send the file to axis so this might be a better solution. Just need to figure out how to load the GladeVCP panel when axis loads...

Thanks
JT
Last Edit: 25 Feb 2015 21:40 by BigJohnT.
More
25 Feb 2015 21:57 #56291 by BigJohnT
BigJohnT replied the topic: GtkEntry Cursor
Any idea what causes this error?
** (gladevcp:3151): CRITICAL **: glide_draw_box_gap: assertion `height >= -1' failed

JT
More
25 Feb 2015 22:00 #56292 by mhaberler
mhaberler replied the topic: GtkEntry Cursor
More
26 Feb 2015 02:36 #56296 by BigJohnT
BigJohnT replied the topic: GtkEntry Cursor
Interesting I only get that error if there is a notebook and I embed the glade into a tab in Axis. I can run the same glade file with a loadusr command in my postgui.hal and no error.

JT
More
28 May 2016 02:38 #75177 by squan09
squan09 replied the topic: GtkEntry Cursor
Were you able to get the cursor to show? I am working on an embedded tab in axis and have the same problem. I am also unable to read the entry box using get_text() in the embedded tab. Using the changed signal I am printing to the terminal I am printing the current value of the entry box. When I type into the entry box in the embedded tab the signal is triggered, but the value is not changed. It just prints out an empty string which is the initial value of the entry box. If I show the window outside of the embedded tab though everything works as expected.

I also have a similar problem setting label text. On a button click I can change a label when in a separate window, but not in the embedded tab. Any idea what I need to do to solve this?
More
02 Jun 2016 13:57 #75332 by andypugh
andypugh replied the topic: GtkEntry Cursor

squan09 wrote: Were you able to get the cursor to show? I am working on an embedded tab in axis and have the same problem.

I have just got used to this. It's annoying, though.

I am also unable to read the entry box using get_text() in the embedded tab

I haven't tried using get_text(), but for many LinuxCNC applications you might be able to do things a different way.
On my lathe macro screens I have a button that calls an O-word sub using the {hal_pin} syntax described here:
www.linuxcnc.org/docs/html/gui/gladevcp....leaction_mdi_widgets
More
02 Jun 2016 19:59 #75358 by squan09
squan09 replied the topic: GtkEntry Cursor
Thanks for the reply. I'll have to look into calling O-word subs. I was able to get the get_text() function to work though. I think my problem was in the __init__ I called self.builder.add_from_file('glade_file.glade') and self.builder.connect_signals(self).

After reading some more it looks like connect_signals is automatically called during initialization, so I guess it was confusing something. After I commented out those 2 lines the get_text() function works along with set_text() which I was having trouble with using on labels.
Moderators: mhaberler
Time to create page: 0.094 seconds
Powered by Kunena Forum