on 09-09-2008 9:21 AM
I have a SDK form, with many folder items on it ('tabs').
Plus a matrix component, with many columns bound to user datasources.
SBO version is 2007.
I notice that when i set the values of the datasources with.ValueEx the screen (and most notably the folderitems) start to redraw, causing lots of flicker when there are many columns. I did some testing and it very specifically occurs on the setting of .ValueEx , without even calling .SetLineData on the matrix.
This behaviour was not present in SBO2005.
Anyone else noticing this behaviour or knows the cause?
A remedy that works is to wrap everything always in a Freeze/Unfreeze of the form, which reduces the flickering in a one time flicker. This is not a nice solution, since actually nothing should even be redrawn yet, until the .SetLineData of the matrix.
I guess using Form Freez and Unfreez is the only solution.
Vasu Natari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use form.freeze for this. The next thing which often helpsd is using progressbar as
Dim oProgBarx As SAPbouiCOM.ProgressBar
oProgBarx = SBO_Application.StatusBar.CreateProgressBar("loading...", 1000, True)
oProgBarx.Stop()
System.Runtime.InteropServices.Marshal.ReleaseComObject(oProgBarx)
oProgBarx = Nothing
Im doing it so:
freeze the form, add new item to the form (load form from xml is faster than creating by item) and then unfreeze the form. When user change panelevel (click on folder), I fill proper item (when they are not bounded to datasource) - if the item is bounded to datasource, there is no flickering.
Sometimes the flickering occurs when you are using formatted search on some editboxes...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This phenomenon does not occur during form loading, etc, it very specifically is after setting the .ValueEx property of a userdatasource bounded to a matrix column.
Which does not make much sense since nothing should be (re)displayed then.
I preferably do not want to litter my code with Freeze/Unfreeze everywhere...
Hi RP de Boer,
Usually that is due to chained Form.Freeze(True), Form.Freeze(False).
Example:
Private Sub myMainSub()
Form.Freeze(True)
mySub1()
mySub2()
Form.Freeze(False)
End Sub
Private Sub mySub1()
Form.Freeze(True)
SubXPTO()
Form.Freeze(False)
End Sub
Private Sub mySub2()
Form.Freeze(True)
'// Do something...
Form.Freeze(False)
End Sub
Private Sub SubXPTO()
Form.Freeze(True)
'// Do something...
Form.Freeze(False)
End Sub
You need to remember that the form flicker when you use Form.Freeze(False).
Regards,
Vítor Vieira
the unfreeze comment is a good tip, although i hoped that the command would be smarter (doing a count of open freeze(true) commands for instance) and only redraw on count = 0.
but i did some xperiments and noticed that is specifically happens at setting the datasource value.
for instance:
columndatasource1.valueex = "value";
sleep (200);
columndatasource2.valueex = "value";
sleep (200);
columndatasource3.valueex = "value";
sleep (200);
columndatasource4.valueex = "value";
sleep (200);
columndatasource5.valueex = "value";
sleep (200);
columndatasource6.valueex = "value";
sleep (200);
will show 6 very clear redraws of the form and very clearly of the folder buttons.
I never noticed it in 2005, but now in 2007.
Try it!
RP de Boer,
From the SDK help file
Description
Returns or sets a value in the data source in database format only.
Property type
Read-write property
Syntax
Visual Basic
Public Property ValueEx() As String
Return Type
The property returns an exceptions if the entered value is not in the accepted format.
Remarks
Acceptable format for dt_MEASURE, dt_PERCENT, dt_PRICE, dt_QUANTITY, and dt_RATE:
xxx.yyy
Acceptable format for dt_DATE:
yyyymmdd - year in four characters, month in two characters, day in two characters.
Changing the machine regional settings does not affect the acceptable format.
This method triggers some kind of validation. I guess it's this validation that causes the flickering in the form.
I suggest you post support message in the partner portal. It could be a bug.
Regards,
Vítor Vieira
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.