DougHennig / Ribbon

A Microsoft Office 365-like ribbon control for VFP forms
24 stars 11 forks source link

listbox #5

Closed NigelGomm closed 3 years ago

NigelGomm commented 3 years ago

if you use .addcontrol() to add a listbox it looks great and works most of the time; but every so often (one in 10?) the listbox fails to repaint itself when you switch between tabs. It's there because if i click the mouse on where it is supposed to be it will re-appear one row at a time as i move the mouse around. I suspect this is a VFP thing rather than the ribbon class but haven't found a way round it yet; i tried putting .visible = .f., .visible = .t. in the listbox's refresh event in the hope it would re-paint itself and that helped a little. But i changed my mind about using a listbox anyway in this particular instance and haven't pursued it yet.

DougHennig commented 3 years ago

I agree it's likely a VFP thing, so there isn't much I can do about it.

NigelGomm commented 3 years ago

not very elegant but putting this into sfribbontab.selected_assign after your "locontrol.visible = .t." seems to do the trick IF PEMSTATUS(loControl,"baseclass",5) AND loControl.BASECLASS = 'Listbox' local lnSE
loControl.THEMES = .F. m.lnSE = loControl.SPECIALEFFECT loControl.SPECIALEFFECT = 1 loControl.SPECIALEFFECT = m.lnSE loControl.THEMES = .T. ENDIF i assume it just causes it to repaint itself.

n

NigelGomm commented 3 years ago

spoke too soon..... works most of the time but still disappearing perhaps 1 in 50 tab switches.