Re: [pygtk] which widget?

2011-08-03 Thread Timo

On 03-08-11 02:21,  wrote:

please see my attachment ,which widget the region1,region2 is?

Region1 seems to be a treeview and region2 a specialized textview.


how to make it??
The treeview widget is available in the standard installation. For such 
a specialized textview, you could have a look at gtksourceview.


Cheers,
Timo



___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

[pygtk] which widget?

2011-08-02 Thread 守株待兔
please see my attachment ,which  widget the region1,region2 is?
how to make it??

re2
Description: Binary data
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Re: [pygtk] which widget

2010-12-02 Thread Leon Bogaert
Hi Steve, thanks for the links.
They both look promising!

From: Stephen George [steve_...@optusnet.com.au]
Sent: Thursday, December 02, 2010 22:21
To: Leon Bogaert
Cc: pygtk@daa.com.au
Subject: Re: [pygtk] which widget

On 2/12/2010 6:16 PM, Leon Bogaert wrote:
> Yeah, but how should I for it to always be on the entries in the ListStore? 
> Because now one can type anything in the combobxEntry. A user could type 
> something, ignore the suggestions and move the focus to another widget. How 
> should I deal with this situations? For example, an on_update handler which 
> checks if the entry in the comboBoxEntry exists in the liststore. If it 
> doesn't exist: remove the entry. But that doesn't seem really user friendly.

Have a look at http://www.astro.umass.edu/~dpopowich/python/   for the
thing called ValidatedEntry.

While it is not a solution to your problem, it does have hooks in place
to prevent the user from leaving the entry until the data entered is
valid, .. I believe it's this functionality that you are looking for
your combo box, to stop the user leaving the combo box till they have
selected a valid entry from your liststore.

There is a demo inside the download, but usage of the demo is not so
intuitive, you need to do through the code to understand what your are
meant to do.

It might give you enough ideas to cobble up something useful.

Also I notice this http://www.gtkforums.com/about4619.html which may be
more applicable to what your asking.

Steve
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] which widget

2010-12-02 Thread Stephen George

On 2/12/2010 6:16 PM, Leon Bogaert wrote:

Yeah, but how should I for it to always be on the entries in the ListStore? 
Because now one can type anything in the combobxEntry. A user could type 
something, ignore the suggestions and move the focus to another widget. How 
should I deal with this situations? For example, an on_update handler which 
checks if the entry in the comboBoxEntry exists in the liststore. If it doesn't 
exist: remove the entry. But that doesn't seem really user friendly.


Have a look at http://www.astro.umass.edu/~dpopowich/python/   for the 
thing called ValidatedEntry.


While it is not a solution to your problem, it does have hooks in place 
to prevent the user from leaving the entry until the data entered is 
valid, .. I believe it's this functionality that you are looking for 
your combo box, to stop the user leaving the combo box till they have 
selected a valid entry from your liststore.


There is a demo inside the download, but usage of the demo is not so 
intuitive, you need to do through the code to understand what your are 
meant to do.


It might give you enough ideas to cobble up something useful.

Also I notice this http://www.gtkforums.com/about4619.html which may be 
more applicable to what your asking.


Steve
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] which widget

2010-12-02 Thread Leon Bogaert
Hi Robert,

Thanks! It's difficult to decise how the user should be "alerted" of the fact 
the input isn't valid. I was looking for an app that does rouglly the same. But 
I only found one and that implementation doesn't really work well :)
A colleague of mine does some interface designing occasionally. I think I'll 
ask him tomorrow how he thinks about that.

Regards,
Leon


From: ad...@exolucere.ca [ad...@exolucere.ca] on behalf of Robert Park 
[rbp...@exolucere.ca]
Sent: Thursday, December 02, 2010 19:03
To: Leon Bogaert
Cc: pygtk@daa.com.au
Subject: Re: [pygtk] which widget

On Thu, Dec 2, 2010 at 12:16 AM, Leon Bogaert  wrote:
> Yeah, but how should I for it to always be on the entries in the ListStore? 
> Because now one can type anything in the combobxEntry. A user could type 
> something, ignore the suggestions and move the focus to another widget. How 
> should I deal with this situations? For example, an on_update handler which 
> checks if the entry in the comboBoxEntry exists in the liststore. If it 
> doesn't exist: remove the entry. But that doesn't seem really user friendly.

Well, your signal handler will know what value the user has typed.
Simply check if that value exists in your liststore, and if it
doesn't, there's any number of things you could do. You could: refocus
the combobox when the user tries to focus away from it, discard any
invalid entry the user has typed, display an error dialog instructing
the user to type something else instead.

You just have to be careful to balance your need to have the input
validated with the users need to not be overly hassled with cumbersome
restrictions on their interaction with the program.

--
http://exolucere.ca
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] which widget

2010-12-02 Thread Robert Park
On Thu, Dec 2, 2010 at 12:16 AM, Leon Bogaert  wrote:
> Yeah, but how should I for it to always be on the entries in the ListStore? 
> Because now one can type anything in the combobxEntry. A user could type 
> something, ignore the suggestions and move the focus to another widget. How 
> should I deal with this situations? For example, an on_update handler which 
> checks if the entry in the comboBoxEntry exists in the liststore. If it 
> doesn't exist: remove the entry. But that doesn't seem really user friendly.

Well, your signal handler will know what value the user has typed.
Simply check if that value exists in your liststore, and if it
doesn't, there's any number of things you could do. You could: refocus
the combobox when the user tries to focus away from it, discard any
invalid entry the user has typed, display an error dialog instructing
the user to type something else instead.

You just have to be careful to balance your need to have the input
validated with the users need to not be overly hassled with cumbersome
restrictions on their interaction with the program.

-- 
http://exolucere.ca
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] which widget

2010-12-01 Thread Leon Bogaert
Yeah, but how should I for it to always be on the entries in the ListStore? 
Because now one can type anything in the combobxEntry. A user could type 
something, ignore the suggestions and move the focus to another widget. How 
should I deal with this situations? For example, an on_update handler which 
checks if the entry in the comboBoxEntry exists in the liststore. If it doesn't 
exist: remove the entry. But that doesn't seem really user friendly.

From: ad...@exolucere.ca [ad...@exolucere.ca] on behalf of Robert Park 
[rbp...@exolucere.ca]
Sent: Thursday, December 02, 2010 07:22
To: Leon Bogaert
Cc: pygtk@daa.com.au
Subject: Re: [pygtk] which widget

On Wed, Dec 1, 2010 at 3:59 PM, Leon Bogaert  wrote:
> So my questions now becomes: how can I (combobox)entry with suggestions and 
> force it to be one of the entries in the ListStore?

Well, you'd have to attach a signal handler to your comboboxentry, and
in the handler you'd define all your fuzzy matching logic.

--
http://exolucere.ca
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] which widget

2010-12-01 Thread Robert Park
On Wed, Dec 1, 2010 at 3:59 PM, Leon Bogaert  wrote:
> So my questions now becomes: how can I (combobox)entry with suggestions and 
> force it to be one of the entries in the ListStore?

Well, you'd have to attach a signal handler to your comboboxentry, and
in the handler you'd define all your fuzzy matching logic.

-- 
http://exolucere.ca
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


Re: [pygtk] which widget

2010-12-01 Thread Leon Bogaert
Nevermind, I found this thread: 
http://stackoverflow.com/questions/2250477/entry-with-suggestions

So my questions now becomes: how can I (combobox)entry with suggestions and 
force it to be one of the entries in the ListStore?

Thanks!

Regards,
Leon


From: pygtk-boun...@daa.com.au [pygtk-boun...@daa.com.au] on behalf of Leon 
Bogaert [l...@tim-online.nl]
Sent: Wednesday, December 01, 2010 23:37
To: pygtk@daa.com.au
Subject: [pygtk] which widget

Hi all,

I'm new to gtk and I don't really know what widget to use for this case;

I have a long list of projects. At first it thought about using a combobox but 
I would really like the user to type the project he/she wants. And it should be 
"fuzzy". So it doesn't only match the first part of the string but ideally 
searches through some properties on an object. It should work a bit like the 
suggestions from Google.

I've also read up on the comboboxentry but I don't really know how I can make 
it so only values from the list are allowed.

Anyone know what would be the easiest way to do this?

Regards,
Leon
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/


[pygtk] which widget

2010-12-01 Thread Leon Bogaert
Hi all,

I'm new to gtk and I don't really know what widget to use for this case;

I have a long list of projects. At first it thought about using a combobox but 
I would really like the user to type the project he/she wants. And it should be 
"fuzzy". So it doesn't only match the first part of the string but ideally 
searches through some properties on an object. It should work a bit like the 
suggestions from Google.

I've also read up on the comboboxentry but I don't really know how I can make 
it so only values from the list are allowed.

Anyone know what would be the easiest way to do this?

Regards,
Leon
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/