Recent

Author Topic: TComboBox in BGRA (custom drawn) theme with TBCDEdit  (Read 2425 times)

tudi_x

  • Hero Member
  • *****
  • Posts: 532
TComboBox in BGRA (custom drawn) theme with TBCDEdit
« on: July 20, 2018, 04:05:52 pm »
hi,
please advise what would the best approach be for a theme where BGRA TBCDEdit is used and also a combo box is needed.
should i use the standard TComboBox or there is another component that would blend better?
thank you
Lazarus 2.0.2 64b on Debian LXDE 10

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: TComboBox in BGRA (custom drawn) theme with TBCDEdit
« Reply #1 on: July 20, 2018, 05:51:28 pm »
Hi =)

I will try to reply to all your posts only in this one. TBCDEdit is just TCDEdit (Custom Drawn package) with a custom theme. If there is functionality that doesn't works it must be fixed in Custom Drawn package first. But AFAIK that package is not mantained anymore.

A way I seen in other packages (like package RX) to make a combobox is to use a TListBox inside a TForm. TListBox already can be themed with OwnerDraw style, and when you type or clic the TEdit show that 'Form with ListBox', manage the events so everything works together.

Edit: I have an autocomplete combobox, that does like that with a TEdit plus a TListBox
https://github.com/Arandusoft/fpcpaymowidget/tree/master/controls

You need to replace TEdit with TBCDEdit and theme TListBox (in BGRAControls there is a component that shows how to theme a TListBox).
« Last Edit: July 20, 2018, 05:54:00 pm by lainz »

tudi_x

  • Hero Member
  • *****
  • Posts: 532
Re: TComboBox in BGRA (custom drawn) theme with TBCDEdit
« Reply #2 on: July 21, 2018, 10:55:09 am »
Quote
If there is functionality that doesn't works it must be fixed in Custom Drawn package first. But AFAIK that package is not mantained anymore.

if this package is not maintained anymore, would it be possible not to download / install the components when installing BGRA?
this way maybe in OPM it could say - hey, be aware, this code is not maintained.
i think it would be nice in OPM to have the last commit date of the repo, maybe even before available since.

thank you.
« Last Edit: July 21, 2018, 10:57:32 am by tudi_x »
Lazarus 2.0.2 64b on Debian LXDE 10

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: TComboBox in BGRA (custom drawn) theme with TBCDEdit
« Reply #3 on: July 21, 2018, 03:05:49 pm »
CustomDrawn is an official Lazarus package plus a widgetset.

But yes we can omit that package from now.

Edit: done, I've removed the custom drawn unit from the register procedure in the dev branch, so from the next release these will not be installed by default anymore (but can be installed just turning on the check in the package files).
« Last Edit: July 21, 2018, 07:58:38 pm by lainz »

 

TinyPortal © 2005-2018