Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Flashing Edit table

I am getting an issue with an editable flashing.
In the specific example it was flashing 4 times after each ribbon bar action on a certain button.
The buttons were to move to previous or next items in the database.
This caused the table to be refreshed, but in addition, after the move I also checked the properties of 4 ribbon buttons and set them to enabled/disabled depending on the context.

These 4 properties being set in the ribbon caused the table to flash.
Commenting out this code removed the flashing, and the fact it set 4 properties and flashed 4 times was no coincidence.

The relevant code is:
IF NUM(CURR_BQ) THEN CALL Set_Property(OLE_RIBBON,"OLE.CommandEnabled[PREV_ITEM]",1) CALL Set_Property(OLE_RIBBON,"OLE.CommandEnabled[NEXT_ITEM]",1) END ELSE CALL Set_Property(OLE_RIBBON,"OLE.CommandEnabled[PREV_ITEM]",0) CALL Set_Property(OLE_RIBBON,"OLE.CommandEnabled[NEXT_ITEM]",0) END IF NUM(CURR_DET) THEN CALL Set_Property(OLE_RIBBON,"OLE.CommandEnabled[PREV_DIM]",1) CALL Set_Property(OLE_RIBBON,"OLE.CommandEnabled[NEXT_DIM]",1) END ELSE CALL Set_Property(OLE_RIBBON,"OLE.CommandEnabled[PREV_DIM]",0) CALL Set_Property(OLE_RIBBON,"OLE.CommandEnabled[NEXT_DIM]",0) END What I did to resolve was to do a check on each of the properties first, and then only set the properties if they are different.
This removed the flashing as the properties in the majority of cases would never change.
Strangely I also have to send a Redraw property to the Edit table, but that's OK.

It is peculiar that there seems to be a relationship between the ribbon and this editable, and it could well be some code I have, as this screen is in a state of flux, and I will be changing quite a bit before it is complete.
The issue however seems to be linked to setting a ribbon property when it is already set.

Colin

Comments

  • Is this edittable (which I assume is an SRP edittable) on the same form as the ribbon, or is it on an MDI child while the ribbon is on an MDI frame? When is the above code called? What triggers it?
  • Does it help to set the ribbon's redraw property 0 before setting all these properties and then setting it back to 1 afterwards?
Sign In or Register to comment.