Recent

Author Topic: TComboBoxEx and TCheckComboBox  (Read 12468 times)

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: TComboBoxEx and TCheckComboBox
« Reply #15 on: September 12, 2014, 02:27:06 am »
I think I found the culprit. Commenting two lines got rid of the problem:
Code: [Select]
procedure TCustomCheckCombo.DropDown;
var aCursorPos: TPoint;
    aRect: TRect;
begin
  //aCursorPos:=ScreenToControl(Mouse.CursorPos);
  aRect:=Rect(FHiLiteLeft, 0, FHiLiteRight, Height);
  //FRejectDropDown:= PtInRect(aRect, aCursorPos);  //<----
  if not FRejectDropDown then
    begin
      inherited DropDown;
      FRejectToggleOnSelect:=False;
    end else
    if ItemEnabled[ItemIndex] then Toggle(ItemIndex);
end;

Blaazen

  • Hero Member
  • *****
  • Posts: 3238
  • POKE 54296,15
    • Eye-Candy Controls
Re: TComboBoxEx and TCheckComboBox
« Reply #16 on: September 12, 2014, 09:48:18 am »
Thanks for investigation! These lines are necessary for Qt4 and GTk2 only.
I guess I can hide them to directive:
Code: [Select]
{$IFNDEF WINDOWS}
  aCursorPos:=ScreenToControl(Mouse.CursorPos);
  aRect:=Rect(FHiLiteLeft, 0, FHiLiteRight, Height);
  FRejectDropDown:= PtInRect(aRect, aCursorPos);  //<----
{$ELSE}
  FRejectDropDown:=False;
{$ENDIF}
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: TComboBoxEx and TCheckComboBox
« Reply #17 on: September 12, 2014, 10:00:34 am »
Maybe* I'm naive but you can run Qt and Gtk on Windows, too, can't you? So that define would then be too restrictive?

http://wiki.lazarus.freepascal.org/Code_Conversion_Guide
Perhaps something like
{$IfDef LCLGtk}
{$IfDef LCLQt}
is better?

*Edit: I'm certainly naive when it comes to components.... There ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Blaazen

  • Hero Member
  • *****
  • Posts: 3238
  • POKE 54296,15
    • Eye-Candy Controls
Re: TComboBoxEx and TCheckComboBox
« Reply #18 on: September 12, 2014, 10:22:37 am »
I think you are right. The condition should be like this:
Code: [Select]
{$IF DEFINED(LCLWin32) or DEFINED(LCLWin64)}
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: TComboBoxEx and TCheckComboBox
« Reply #19 on: September 20, 2014, 02:17:22 pm »
combo6 test on win7 64bit
=======================
o got a [SIGSEGV] on mouse down and key down
Code: [Select]
on [DrawItem]
file [comboex.inc]line[598]


also there is not focus indication
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4468
  • I like bugs.
Re: TComboBoxEx and TCheckComboBox
« Reply #20 on: September 21, 2014, 02:11:55 pm »
These components are now part of LCL. Thanks a lot Blaazen for this contribution!

I did only simple testing.
Everybody, please report any possible bugs in the bug tracker. I will mark them as related to the original issue :
 http://bugs.freepascal.org/view.php?id=26515
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018