Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Excessive redrawing
Any suggestions on what would cause constant redrawing of a window?
I've been alerted to an instance of poor performance and the visual symptoms are the screen constantly redrawing itself.
The most obvious is with radio buttons. When you simply move/hover over the radio buttons, they flash, in that the text disappears and then reappears as you move across it.
You can see a video of it here
I checked the window events and there were some old scripts in both the omnievent and winmsg events for handling contextmenus so I just had them return without executing any code and there was no improvement.
I was able to get some noticeable improvement by removing the group boxes on the form (made them invisible). It was better but there's still some lag.
Look here to see what I mean
Here's the kicker and why I'm posting it here. Before it being brought to my attention, the customer had their IT people check into it and the details passed on were that whilst hovering, the cpu usage increased by about 25% and the offending components were SRP. I don't know what diagnostics tools were being used to come up with that and unfortunately at this point I don't have any more detail than that to go on so I don't know what SRP things they were pointing at and it's possibly a furfy but it's out there so I need to ask. Monitoring task manager I could see the overall cpu increase as well but not pinpoint any particular thing at fault.
There are no SRP controls on that form at all. The MDI does have an SRP ribbon, however I also ran the form direct from the application manager, so outside of the mdi and it displayed the same symptoms so I don't think that's related.
I'll try and get more info but keen to hear any suggestions on possible causes or how to better troubleshoot.
I've been alerted to an instance of poor performance and the visual symptoms are the screen constantly redrawing itself.
The most obvious is with radio buttons. When you simply move/hover over the radio buttons, they flash, in that the text disappears and then reappears as you move across it.
You can see a video of it here
I checked the window events and there were some old scripts in both the omnievent and winmsg events for handling contextmenus so I just had them return without executing any code and there was no improvement.
I was able to get some noticeable improvement by removing the group boxes on the form (made them invisible). It was better but there's still some lag.
Look here to see what I mean
Here's the kicker and why I'm posting it here. Before it being brought to my attention, the customer had their IT people check into it and the details passed on were that whilst hovering, the cpu usage increased by about 25% and the offending components were SRP. I don't know what diagnostics tools were being used to come up with that and unfortunately at this point I don't have any more detail than that to go on so I don't know what SRP things they were pointing at and it's possibly a furfy but it's out there so I need to ask. Monitoring task manager I could see the overall cpu increase as well but not pinpoint any particular thing at fault.
There are no SRP controls on that form at all. The MDI does have an SRP ribbon, however I also ran the form direct from the application manager, so outside of the mdi and it displayed the same symptoms so I don't think that's related.
I'll try and get more info but keen to hear any suggestions on possible causes or how to better troubleshoot.
Comments
Alas, no improvement to the problem.
FWIW, another symptom is the changing of the page after the tab (pushbutton) is clicked.
It takes a few seconds to switch and you see each of the controls being drawn basically one at a time.
How ugly is this behaviour
Started to put them back again and symptoms begin to reappear.
I'm not a big fan of group boxes or excessive group boxes myself so perhaps just getting rid of them and selective implementation of picture control dividers may be the simplest answer
>>picture control dividers
What are these?
What have i missed.
Ctrl=@Window:".OLECONTROL_1"
foo=Set_Property(Ctrl, "OLE.ControlPart", "DIV")
foo=Set_Property(Ctrl, "OLE.Caption", "This is a caption")
foo=Set_Property(Ctrl, "OLE.CaptionAlignment", "Top":@FM:"Left")
It's just the simplest approach. With that in mind,here's how you would achieve what you're going for
Now that I've reread and retested, nope, they're always centered.
Sorry for the bum steer
If need be, you can add a shorter picture control to the left of the label as well so it still looks like the caption is part of the same line. That way you can control exactly where you want the caption.
Yeah, that's what I really said.
Also as noted, the Caption can be aligned to the left. However, the Alignment property must be used rather than the CaptionAlignment property (wait...what????). Yeah...it's a bit confusing due to feature creep. The CaptionAlignment property is for a caption being used in the Picture control when it is not a ControlPart whereas the Alignment property is for a caption being used when the Picture control is a ControlPart. I'm not sure why we needed to create two properties...but it's been that way for a while.
By the way, you can also use the CaptionOffset property to nudge the location left or right by a number of pixels. Here's how I setup my dividers:
Ctrl = @Window : '.OLE_DIVIDER' Set_Property(Ctrl, 'OLE.ControlPart', 'Divider') Set_Property(Ctrl, 'OLE.Caption', 'Hello World') Set_Property(Ctrl, 'OLE.Alignment', 'Vertical' : @FM : 'Left') Set_Property(Ctrl, 'OLE.CaptionOffset', 0 : @FM : -5)