PDA

View Full Version : ComboForms being highlighted after resize



raveens
14-Jun-2015, 10:39 PM
Hi DAW,

I guess this is not new DF18.1 but if you resize a view - all paged (db)ComboForms will have its text highlighted. Its just pretty overwhelming if the view has a few of combo-forms.

My quick solution:



Procedure DoApplyAnchors Integer Arg1 Integer Arg2
Integer iStart iEnd
Get SelStart to iStart
Get SelEnd to iEnd
Forward Send DoApplyAnchors Arg1 Arg2
Send SetSel iStart iEnd
End_Procedure


This seems to fix the issue, but I've sure there is a better approach.

Thanks.

Frank Cheng
15-Jun-2015, 10:36 AM
That's pretty funny. I didn't believe it until I tried it myself. Thanks for sharing.

Frank Cheng

Stephen W. Meeley
15-Jun-2015, 10:50 AM
Raveen,

Like Frank I had to see it to believe it - sure enough, that's what happens. I have no idea how many years this has been there (but I'm guessing since the beginning) but this is the first time I can recall anyone reporting it (nothing in BugTracker).

Gregg Finney
15-Jun-2015, 12:05 PM
Just tried in a dbmodal panel with the combo's in dbTabpages and it does does not happen. Maybe it's just a view thing.

Gregg Finney
15-Jun-2015, 01:28 PM
Hi Raveen,
What are your peAnchors in the combo's set to?

raveens
15-Jun-2015, 03:28 PM
Hi Gregg,

It seems that the highlighting occurs only when peAnchors > anNone

raveens
15-Jun-2015, 03:55 PM
Hi Stephen,

I first noticed this when we moved from VDF11.1 to VDF17 - which I put aside as a 'compatibility' issue as we are using a sub-classed dbComboForm. But after some testing, I found that issue lies in the dbComboForm itself and plus it was getting 'overwhelming' when you have rows of dbComboForms in a view.

What's worst is TabPages - if you have dbComboForms on an un-paged TabPage and if you click on the tabpage to activate it - all the dbComboForms are paged with its text highlighted.

The code fix I provided fixes the case when a view and/or its container is resized, but not when a tabpage is activated.

Thanks.

John Tuohy
15-Jun-2015, 04:27 PM
To all,

I remember looking into this several years back and I am pretty certain that I concluded that this was a windows bug. This might go all the way back to Vista.

-John

raveens
15-Jun-2015, 04:47 PM
Just a little update to this 'fix'



Procedure DoApplyAnchors Integer Arg1 Integer Arg2
Integer iStart iEnd
If (Focus(Desktop)=Self) Begin
Get SelStart to iStart
Get SelEnd to iEnd
End
Forward Send DoApplyAnchors Arg1 Arg2
Send SetSel iStart iEnd
End_Procedure

Procedure Page Integer iPageObject
Forward Send Page iPageObject
If (iPageObject=1 and Focus(Desktop)<> Self) Send SetSel 0 0
End_Procedure


works better with tabpages now.

note: this is probably a band-aid fix.

Frank Cheng
16-Jun-2015, 12:14 AM
FYI, it happens on Windows XP as well.

Frank Cheng