PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Petrus Vorster on February 21, 2017, 01:13:45 PM

Title: Firelines
Post by: Petrus Vorster on February 21, 2017, 01:13:45 PM
Hi All

I have used the Firelines tool of Paul in a project just to create a visible divider between a few controls.
Interestingly, when say another Form opens over it, then its fine, but some pop-ups like message-boxes will delete a portion of the line.
That looks quite awkward on a form having a divider line with missing bits and pieces.

Any ideas?
Title: Re: Firelines
Post by: José Roca on February 21, 2017, 02:57:52 PM
Redraw the form.
Title: Re: Firelines
Post by: Petrus Vorster on February 21, 2017, 05:42:38 PM
Ok, but how do i know when this happens, because it only happens while the program runs.
On what occasion/trigger/event will one do that?
Title: Re: Firelines
Post by: Petrus Vorster on February 21, 2017, 05:49:22 PM
This actually only happens during the event where two different TEXTBOXES that were set to NUMBERS ONLY receives an invalid key.
The windows pop-up appears about the invalid character.
Then it deletes the FIRELINE in different sizes and places.
This is annoying.

Image 1 shows the form while running correctly.
Image 2 Shows textbox1 (PO Box numbers) and textbox 7 (Cell numbers). Both these are set to NUMBERS ONLY
Image 3 shows what happens to the line if there was an invalid character warning in any of the two textboxes. The lie is deleted in various lengths.
Title: Re: Firelines
Post by: Paul Squires on February 21, 2017, 06:08:57 PM
How about in the WM_PAINT handler for the FORM, you make a call to FF_CONTROL_REDRAW( FireLinesHandle ) and see what happens?

Title: Re: Firelines
Post by: Petrus Vorster on February 22, 2017, 03:20:47 PM
It works, but i had to put it three places.
In the wm_paint, and killfocus of the two textboxes.

You can still clearly see the deletion of the line, but at least it repaints it afterwards.

Perhaps i should just changes the textboxes and prevent the characters with code iso the setting?
Title: Re: Firelines
Post by: Petrus Vorster on February 22, 2017, 03:28:33 PM
Yes, that work so much easier....
:-[

Where is the corner i have to go stand again? LOL