Author |
Topic: Graphics paint issue -- incomplete objects (Read 780 times) |
|
g3nrw
Junior Member
member is offline


Posts: 74
|
 |
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
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
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: 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.
|
|
Logged
|
|
|
|
g3nrw
Junior Member
member is offline


Posts: 74
|
 |
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
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
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.
|
|
Logged
|
|
|
|
g3nrw
Junior Member
member is offline


Posts: 74
|
 |
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
|
|
Logged
|
|
|
|
|