BBC BASIC for Windows
« Graphics paint issue -- incomplete objects »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:26pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Graphics paint issue -- incomplete objects  (Read 779 times)
g3nrw
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 74
xx Graphics paint issue -- incomplete objects
« Thread started on: Dec 19th, 2014, 09:17am »

When displaying a BB4W-generated window, I sometimes find that part of an object is missing, but when I sweep over the object with the cursor, it repaints correctly.

Here is an extreme example that someone just sent me:

http://homepage.ntlworld.com/wadei/incomplete%20paint.jpg

The bottom is missing from some of the controls, and the right half of some radio buttons is also missing.

I suspect I have made the bounding boxes too big for some controls, such that they encroach on nearby controls.

Ideas anyone? (apart from comments on the non-Microsoft-approved layout!)

--
Ian

User IP Logged

rtr2
Guest
xx Re: Graphics paint issue -- incomplete objects
« Reply #1 on: Dec 19th, 2014, 11:50am »

on Dec 19th, 2014, 09:17am, g3nrw wrote:
When displaying a BB4W-generated window, I sometimes find that part of an object is missing, but when I sweep over the object with the cursor, it repaints correctly.

Just to clarify, your picture would suggest that this is in fact a set of Windows Controls (probably in a dialogue box) rather than BB4W-drawn graphics.

Quote:
I suspect I have made the bounding boxes too big for some controls, such that they encroach on nearby controls.

It certainly looks like an overlapping-controls issue. Correct that, if necessary, and let us know if it fixes the problem.

Quote:
Ideas anyone?

How do you draw the horizontal 'dividing lines'? In several places it looks as though they may be responsible. I wonder why you haven't used 'group boxes' as the means of organising the controls (maybe that's what you meant by "non-Microsoft-approved layout").

If you fancy a challenge, write a little utility which would examine a dialogue-box template, extract all the controls' rectangles, and report whether any of them overlap; there's an API function - IntersectRect - which would be helpful. In fact, perhaps this could be a 'holiday challenge' for BB4W users in general (the Liberty BASIC boys are fond of competitions of this sort)!

Richard.
User IP Logged

g3nrw
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 74
xx Re: Graphics paint issue -- incomplete objects
« Reply #2 on: Dec 20th, 2014, 09:06am »

Thanks Richard

Yes, it was an overlapping bounding box situation. Now fixed.

I tried to use Group boxes, but dropped them because:

a. There isn't enough vertical room
b. More important, they are barely visible

How did I draw the horizontal "dividing lines"?

Code:
PROC_static(dlg%, \
\  "_________________________________________________________________________________________" + \
\  "_________________________________________________________________________________________" + \
\  "_________________________________________________________________________________________" , \
\staticUnderline%,   0, 19, panelWidth%, 9,0)
 


Re your challenge: being more used to the graphics capability of VB, I have been looking at the possibility of positioning the controls on a form using the mouse, then extracting the X/Y/delta-X/delta-Y parameters for BB4W. But don't hold your breath!

--
Ian
User IP Logged

rtr2
Guest
xx Re: Graphics paint issue -- incomplete objects
« Reply #3 on: Dec 20th, 2014, 11:59am »

on Dec 20th, 2014, 09:06am, g3nrw wrote:
I have been looking at the possibility of positioning the controls on a form using the mouse

Did you not design your form using DLGEDIT (or one of the improved, custom, versions such as JDlgEdit or DlgEditCE)? Designing a complex dialogue box without a graphical aid is hard work!

Incidentally I presume nothing came of the idea of porting FreeForm to BB4W, which somebody said they were planning to attempt.

Richard.
User IP Logged

g3nrw
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 74
xx Re: Graphics paint issue -- incomplete objects
« Reply #4 on: Dec 20th, 2014, 2:57pm »

Dlgeditce is a new one on me. I will have a look at it.

Yes, it is hard to write the raw code, specially when you have to move most of the controls down the screen by 5 units to make room for something else!

--
Ian
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls