Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #17233
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news-transit.tcx.org.uk!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; '>in': 0.07; 'stuff,': 0.07; 'canvas': 0.09; 'dynamically': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'win32': 0.12; 'thanks!': 0.14; '>does': 0.16; '>somebody': 0.16; 'bieber': 0.16; 'canvas.': 0.16; 'direction?': 0.16; 'email addr:ix.netcom.com': 0.16; 'email name:wlfraed': 0.16; 'from:addr:ix.netcom.com': 0.16; 'from:addr:wlfraed': 0.16; 'from:name:dennis lee bieber': 0.16; 'message-id:@4ax.com': 0.16; 'received:wlfraed': 0.16; 'rectangle': 0.16; 'url:netcom': 0.16; 'url:wlfraed': 0.16; 'worked.': 0.16; 'wulfraed': 0.16; 'wed,': 0.17; 'wrote:': 0.18; 'onto': 0.18; "haven't": 0.20; 'trying': 0.21; 'url:home': 0.21; 'maybe': 0.21; 'dec': 0.22; 'received:166': 0.23; "i'm": 0.26; 'tried': 0.27; 'coding': 0.28; 'lee': 0.28; 'drawing': 0.29; 'lines': 0.30; 'positioned': 0.30; 'rendered': 0.30; 'toolkit': 0.30; 'widget': 0.30; 'specified': 0.31; 'subject:?': 0.31; "can't": 0.32; 'header:X-Complaints-To:1': 0.33; 'points': 0.34; 'to:addr:python-list': 0.34; 'it.': 0.34; 'but,': 0.34; 'root': 0.34; 'subject:What': 0.34; 'visible': 0.34; 'totally': 0.35; 'charset:us-ascii': 0.37; '(to': 0.37; 'combination': 0.37; 'but': 0.37; 'except': 0.37; 'think': 0.37; 'could': 0.37; 'received:org': 0.38; 'some': 0.38; 'background': 0.40; 'to:addr:python.org': 0.40; 'type': 0.61; '2011': 0.61; 'opened': 0.64; 'mouse': 0.67; 'saw': 0.67; 'photo': 0.68; 'content.': 0.71; 'dennis': 0.73; 'subject:this': 0.74; '-0800': 0.84; 'basics.': 0.84; 'mouse,': 0.84; 'outline,': 0.84; 'photo.': 0.84; 'subject:widget': 0.84; 'render': 0.91; 'border': 0.93 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
| Subject | Re: What is this widget? |
| Date | Wed, 14 Dec 2011 14:54:39 -0500 |
| References | <d69ec70b-45aa-41b1-81e9-9d15f116c1df@o9g2000yqa.googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | mobile-166-147-100-012.mycingular.net |
| X-Newsreader | Forte Agent 6.00/32.1186 |
| X-No-Archive | YES |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3655.1323892507.27778.python-list@python.org> (permalink) |
| Lines | 34 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1323892507 news.xs4all.nl 6977 [2001:888:2000:d::a6]:52996 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:17233 |
Show key headers only | View raw
On Wed, 14 Dec 2011 10:47:24 -0800 (PST), Muddy Coder
<cosmo_general@yahoo.com> wrote:
>I am trying to write letters on a photo that is opened in a canvas. So
>I think I must need a widget to contain the letters I will type in. I
>tried to use a Label, it worked. But, a Label covered part of the
>photo underneath, so I can't use it. I saw some software did such a
>thing nicely: a box popped on a photo, with dotted lines as borders,
>expandable. When such a box was re-sized with a mouse, the font size
>in the box also got changed. The box has no background color, so it
>does not cover a rectangle area on the photo. I need such a widget,
>but I don't know what is this one. I tried Text, Label, but they all
>come with Window-like stuff, so they cover some photo content. Can
>somebody points me a direction? Thanks!
You haven't specified which toolkit you are using: Tk, wx, GTK,
win32 native... So I'm going to go down to the root basics.
The "widget" would be the entire image canvas, you have to intercept
each key stroke and mouse operation (to control the dotted box size),
and render the text via a combination of first blitting the photo to the
canvas and then drawing the dotted box and text over the rendered photo.
With advanced coding you could keep track of the dotted border and
only blit that part of the photo onto the visible canvas each time you
update the box contents.
Maybe some toolkit has a native way to do this, but it would have to
be a totally transparent widget except for the dot outline, dynamically
positioned over the photo canvas.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
What is this widget? Muddy Coder <cosmo_general@yahoo.com> - 2011-12-14 10:47 -0800 Re: What is this widget? Dave Angel <d@davea.name> - 2011-12-14 14:48 -0500 Re: What is this widget? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-12-14 14:54 -0500 Re: What is this widget? Terry Reedy <tjreedy@udel.edu> - 2011-12-14 18:23 -0500 Re: What is this widget? Rick Johnson <rantingrickjohnson@gmail.com> - 2011-12-15 07:33 -0800
csiph-web