How to hide the down arrow in a TsDBLookupComboBox

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #37563
    HeDiBo
    Participant

    I have a TsDBLookupComboBox that can be used to select a record in certain situations, but should just show the current ListField[ListFieldIndex] text without allowing to select anything else.

    The easiest and least complicated way to do that looks to be to hide the button with the down arrow. Is there a way to accomplish that?

    #56975
    Support
    Keymaster

    Hello

    Easiest way will be changing a width of button to 0, I think (declared as private).

    Look attached demo, it was tested with Delphi 7 only.

    #56976
    HeDiBo
    Participant
    'Support' wrote:

    Hello

    Easiest way will be changing a width of button to 0, I think (declared as private).

    Look attached demo, it was tested with Delphi 7 only.

    Thanks for your suggestion.

    Unfortunately it only works if the TsDBLookupCombo is not skinned. If you clear the SkinSection in the SkinData property and add a skinmanager and skinprovider, it doesn't work anymore.

    PS. I didn't know you could fill in something like TSDBLOOKUPCOMBOBOX in the skin section. I assume anything not predefined turns skinning off.

    #56983
    Support
    Keymaster

    Hello

    This component has been updated in the v12.14, you can try it again.

    #56994
    HeDiBo
    Participant
    'Support' wrote:

    Hello

    This component has been updated in the v12.14, you can try it again.

    It works now. Thank you a3.gif

    #57453
    HeDiBo
    Participant

    I came across this yesterday, and I cannot understand what makes this work.

    Because basically you add two variables to TDBLookupControl. When you leave out the FDataList variable, which is not used in the source at all, it doesn't work anymore blink.gif

    What tricks are you playing with this? How does this work? Shouldn't there be a more civil way of getting the effect of hiding the drop down button?

    Please explain wacko.gif

    #57466
    Support
    Keymaster

    I don't know another way at the moment, this property is hidden too deep.

    This way is usable, I think, but declaration of the TAccessLookUpCombo should be checked with other Delphi versions and changed if it's needed there.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.