Page 1 of 1

Python script enables continuous auto stretch but GUI doesn't show change.

Posted: Mon Oct 20, 2025 2:43 pm
by cydonia
Hi Robin,

I've been trying to add the ability to enable the "locked auto stretch" via the Sequencer or python scripting and have had some success doing it (using the script command below) however I think I may have discovered a bug.

It seems that whilst the code enables the feature, the GUI does not seem to reflect the change and still shows it as off in the GUI, even though it's on and working. As a result it locks the rest of the stretching buttons (as expected) but with no indication to the user that it's enabled as the button doesn't highlight. This is OK if you know you've done it but I'm pretty sure it should probably toggle the button to on in the GUI to show it as enabled.

The command I used was: SharpCap.DisplayStretch.ContinuousAutoStretch = 1

To return the controls to normal you just need to click the lock to turn it on (even though it is already on), then you can click it again to turn it off and the rest of the controls then work again, allowing you to reset the stretch or apply an auto stretch etc. Alternatively you can just run the python code with = 0 and it will do the same and return the controls to normal.

It maybe just a quirk of the scripting, or I am doing something wrong, but other controls I have used scripting for seem to toggle the GUI controls properly.

SharpCap Version: 4.1.13835.0 - 10/13/2025

Re: Python script enables continuous auto stretch but GUI doesn't show change.

Posted: Tue Oct 21, 2025 12:47 pm
by admin
Hi,

yes, given the way that the code works at the moment, the lack of UI updates is expected (if not ideal!). I think it should be fairly easy to make the UI update properly, so I will try to implement that improvement.

cheers,

Robin