In the attached demo when it initially runs resizing the TColorBandTool works fine--the editor gets the end value of the color band.
If the checkbox "Toggle Visibility" is checked and the band is resized, the editor flashes but is never displays the end value until the mouse lets go of resizing the band.
What causes this? How can this be fixed?
Thank you,
Ed Dressel
Band Resizing and setting .Visible locks up display
-
- Newbie
- Posts: 16
- Joined: Mon Dec 05, 2016 12:00 am
Band Resizing and setting .Visible locks up display
- Attachments
-
- UI Lock Up.zip
- (2.08 KiB) Downloaded 915 times
Re: Band Resizing and setting .Visible locks up display
Hello,
I'm not sure to understand what's the purpose of the test.
You are calling UpdateLayoutControl everytime the ColorBandTool is resized:
And you are changing the curEndValue visibility every time UpdateLayoutControl is called, if chkToggleVisiblity2 checkbox is checked:
This makes the curEndValue visibility to change every time the ColorBandTool is resized, and this produces that strange flickering.
I'm not sure to understand what's the purpose of the test.
You are calling UpdateLayoutControl everytime the ColorBandTool is resized:
Code: Select all
procedure TForm1.ColorBandResizing(Sender: TObject);
begin
UpdateLayoutControl;
end;
Code: Select all
procedure TForm1.UpdateLayoutControl;
begin
curEndValue.Text := FloatToStr(ColorBand.EndValue);
if chkToggleVisiblity2.Checked then
begin
curEndValue.Visible := not curEndValue.Visible;
// curEndValue.Visible := not curEndValue.Visible;
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 16
- Joined: Mon Dec 05, 2016 12:00 am
Re: Band Resizing and setting .Visible locks up display
It is a very simplified version of a product I have. What has been frustrating is that the band resizing does not occur (it appears locked) when the editor's visibility is updated every time.
I changed the code a little so that it toggles the .Visible property every other time, and it is much better, no matter ow quick I move the mouse. But I still don't understand why the band does not update.
Ed Dressel
I changed the code a little so that it toggles the .Visible property every other time, and it is much better, no matter ow quick I move the mouse. But I still don't understand why the band does not update.
Ed Dressel
Code: Select all
if chkToggleVisiblity2.Checked then
begin
curEndValue.Tag := curEndValue.Tag + 1;
if curEndValue.Tag > 1 then
begin
curEndValue.Visible := not curEndValue.Visible;
curEndValue.Tag := 0;
end;
end;
Re: Band Resizing and setting .Visible locks up display
Hello,
Here is what I'm getting: Are you getting the same behaviour?
I see the the value in the TEdit is updated when I resize the ColorBand from the right side, both having the checkbox active or inactive.
I'm not sure to understand what do you find to be blocked.
Here is what I'm getting: Are you getting the same behaviour?
I see the the value in the TEdit is updated when I resize the ColorBand from the right side, both having the checkbox active or inactive.
I'm not sure to understand what do you find to be blocked.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 16
- Joined: Mon Dec 05, 2016 12:00 am
Re: Band Resizing and setting .Visible locks up display
(Argh... I've replied 2x to this and it isn't saving. Looks liek the attachment was 3k too big).
I reworked the demo so that there are three options for updating the editor:
1) "None" (works fine),
2) "Every Other Time" (works fine), and
3) "Every Time" (does not work fine).
Here is a video of what I am seeing:
http://www.tbinc.com/misc/ToggleVisibleAffect.mp4
Ed Dressel
I reworked the demo so that there are three options for updating the editor:
1) "None" (works fine),
2) "Every Other Time" (works fine), and
3) "Every Time" (does not work fine).
Here is a video of what I am seeing:
http://www.tbinc.com/misc/ToggleVisibleAffect.mp4
Ed Dressel
- Attachments
-
- UI Lock Up.zip
- (2.3 KiB) Downloaded 908 times
Re: Band Resizing and setting .Visible locks up display
Hello,
Changing the TEdit visibility seems to be preventing the TChart (and the TColorBandTool) to be repainted when the TColorBandTool is resized.
Forcing a chart repaint solves it:
Changing the TEdit visibility seems to be preventing the TChart (and the TColorBandTool) to be repainted when the TColorBandTool is resized.
Forcing a chart repaint solves it:
Code: Select all
procedure TForm1.UpdateLayoutControl;
var
lToggleFrequency: Integer;
begin
curEndValue.Text := FloatToStr(ColorBand.EndValue);
if comToggleFrequency.ItemIndex <> 0 then
begin
curEndValue.Tag := curEndValue.Tag + 1;
lToggleFrequency := comToggleFrequency.ItemIndex - 1;
if curEndValue.Tag > lToggleFrequency then
begin
curEndValue.Visible := not curEndValue.Visible;
curEndValue.Tag := 0;
Chart1.Draw; //Force a chart repaint
end;
// curEndValue.Visible := not curEndValue.Visible;
end;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |