Board index » delphi » StayOnTop interferes with drop-down lists in DBGrid

StayOnTop interferes with drop-down lists in DBGrid

A coworker of mine encountered this odd behavior:

A form with FormStyle set as fsStayOnTop, with a DBGrid filling the
form - one of the columns in the DBGrid is set with cbsAuto and a
pick list.  He tried to figure out why his pick list wasn't working
until he added several more choices to the list, and found that the
last choices were peeking out BELOW the form - in other words, the
form was fsStay-ing-on-top of the drop-down pick list!

Anyone ever encountered this?  Anyone found a way by it?  We'd rather
not remove the form's fsStayOnTop because there can be several of them
floating in front of the main form and we don't want them to disappear
when someone chooses a menu item.

  --=- Ritchie Annand

 

Re:StayOnTop interferes with drop-down lists in DBGrid


Someone in our group encountered the same problem.
Not sure of the exact work-around, but it was something along the
lines of changinf the FormStyle only when the drop-down control was
active, then resetting it. Not satisfactory, but it did the job.

Quote
anna...@cadvision.com (Ritchie Annand) wrote:
>A coworker of mine encountered this odd behavior:
>A form with FormStyle set as fsStayOnTop, with a DBGrid filling the
>form - one of the columns in the DBGrid is set with cbsAuto and a
>pick list.  He tried to figure out why his pick list wasn't working
>until he added several more choices to the list, and found that the
>last choices were peeking out BELOW the form - in other words, the
>form was fsStay-ing-on-top of the drop-down pick list!
>Anyone ever encountered this?  Anyone found a way by it?  We'd rather
>not remove the form's fsStayOnTop because there can be several of them
>floating in front of the main form and we don't want them to disappear
>when someone chooses a menu item.
>  --=- Ritchie Annand

Re:StayOnTop interferes with drop-down lists in DBGrid


In article <5d6ic2$co...@proxy01.iafrica.com>,
   barba...@directaccess.co.za (Barbara George) wrote:

Quote
>Someone in our group encountered the same problem.
>Not sure of the exact work-around, but it was something along the
>lines of changinf the FormStyle only when the drop-down control was
>active, then resetting it. Not satisfactory, but it did the job.

*laugh* We were throwing around that potential solution as well, but
were loathe to implement it.  I was just looking around the source
code for that list (I think it's a TPopupList) - I'm going to try and
put an "or WS_EX_TOPMOST" in the ExStyle (I think) of the TPopupList's
CreateParams and see if that cures it.

I guess it's just one of those bazillion combinations Borland just
missed :)

I'll tell you how the source fix works (if it does :)

  --=- Ritchie Annand

Re:StayOnTop interferes with drop-down lists in DBGrid


Would be very interested to hear what happens. Thanks for the reply

Barbara

Quote
anna...@cadvision.com (R.Annand) wrote:
>In article <5d6ic2$co...@proxy01.iafrica.com>,
>   barba...@directaccess.co.za (Barbara George) wrote:
>>Someone in our group encountered the same problem.
>>Not sure of the exact work-around, but it was something along the
>>lines of changinf the FormStyle only when the drop-down control was
>>active, then resetting it. Not satisfactory, but it did the job.
>*laugh* We were throwing around that potential solution as well, but
>were loathe to implement it.  I was just looking around the source
>code for that list (I think it's a TPopupList) - I'm going to try and
>put an "or WS_EX_TOPMOST" in the ExStyle (I think) of the TPopupList's
>CreateParams and see if that cures it.
>I guess it's just one of those bazillion combinations Borland just
>missed :)
>I'll tell you how the source fix works (if it does :)
>  --=- Ritchie Annand

Other Threads