rubytk dialog

E

Enrico Schwass

Hello

A newbie question. In my application there is a listbox. The entries of
this listbox should be changeable.
I would like to see a popup dialog box with an entry field and two
buttons (OK/Cancel). So far I defined
a ValueDialog class that in his initialize method creates and packs all
the neccessary widgets in a toplevel,
makes a TkVariable, defines bindings that change this var and calls
var.wait. So far so good.

From another part of the application I than call d =
ValueDialog.new(parent, init_label,init_entry)
What I miss is a way to get the changed entry back. d is a ValueDialog.
Something like d.get_value
is not useful because the widgets are destroyed after var.wait. Whats
the right style?
Initialize is the false place to do this? I couldnt find much sample
code. Only tkcombobox.rb includes
something similiar, but I am not been able to understand that fully, yet

Thanks
Enno
 
H

Hidetoshi NAGAI

From: Enrico Schwass <[email protected]>
Subject: rubytk dialog
Date: Wed, 8 Jun 2005 01:22:57 +0900
Message-ID: said:
From another part of the application I than call d =
ValueDialog.new(parent, init_label,init_entry)
What I miss is a way to get the changed entry back. d is a ValueDialog.

Could you show me your code of ValueDialog class?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top