realbasic-nug
[Top] [All Lists]

Re: Drawing on canvas in realbasic on windows

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: Drawing on canvas in realbasic on windows
From: "Rubber Chicken Software Co." <support@chickensys.com>
Date: Sun, 31 Aug 2008 14:01:39 -0500
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <0CEE06EE-BCCC-48EA-872C-34973BFD0315@inspiringapps.com>
References: <c867e59d0808310436o7424ee91gdbe7ea700d1a23ae@mail.gmail.com> <A2C34FFB-6FE0-4C3C-B8A5-7D9406E74F3F@inspiringapps.com> <c867e59d0808310655n6aee6b7bje34c7c3532ce1617@mail.gmail.com> <0CEE06EE-BCCC-48EA-872C-34973BFD0315@inspiringapps.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
At 12:51 PM 8/31/2008, you wrote:

>It makes the editfields that are on top of the canvas disappear in Vista.

Ah.  I recommend not putting other controls on top of canvases.

I completely second that. This works just fine on Mac and looks horrendous in Windows. This has dramatically lengthened my "time to market".

To give a positive answer, from the design stage of your app put this into consideration and work your backgrounds AROUND the controls. like Brainchild said). When that is not possible, draw on your background a "controlish" graphic (like a button, checkbox, or whatever) and handle clicks in that space as a MoudeDown or MouseUp etc.

I found in my case that Brainchilds workaround didn't work for me, I have way too many things going on. Making a background with numerous canvases "implying" numerous holes was way too difficult and hard to maintain. Plus, the resolution is not smooth enough to mkae the edges realistic.

I designed a mini-GDI (if you can call it that) just to workaround RB's drawing handicap in this area. (It's not Window's fault.) I have a Canvas sub-class and several helper classes where I can define areas that work as clickable controls and also StaticText. I register these on startup. It handles lots of details, like graphically showing the "pushdown" of a button and using Mac or Windows checkboxes, and other things.

So in essence I forfeit controls on canvases and designed my own GDI so I'm always updating the single Canvas to reflect graphical changes, and receiving Mouse-clicks, Mouse-drops, and Mouse-DragStart starts manually and handling them appropriately.

It was a drag to write the classes because this stuff looks so good in Mac and easy by just using the normal controls. It's such a shame this has to be entirely forfeited in Windows apps when you have background image conditions. I felt like I was "rewriting RealBAASIC".

* * * * * * * * * * * * * * * * * * * * * * * * * * *
| Garth Hjelte                                      |
| Customer Service Representative, President        |
| Chicken Systems, Inc, Rubber Chicken Software Co. |
| 714 5th Street SE                                 |
| Willmar, MN 56201 USA                             |
|                                                   |
| 800-8-PRO-EPS    Toll Free Order Line (US Only)   |
| 320-235-9798     Tech Support, Sampler Questions  |
|                  International Line               |
| 360-838-7689     Fax                              |
| Product Sales:   sales@chickensys.com             |
| Product Support: support@chickensys.com           |
| Sampler Q+A:     qa@chickensys.com                |
| Web Page:        www.chickensys.com               |
* * * * * * * * * * * * * * * * * * * * * * * * * * *


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>