Recent

Author Topic: Default cursor for control doesn't work  (Read 4637 times)

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Default cursor for control doesn't work
« on: May 02, 2012, 10:35:13 am »
I have a panel with a small side area of 3px where the cursor is changed to crSizeNW/SW etc. (it's a resizeable panel). On the panel is a control, ie. listbox or glcontext. The embedded control has crDefault property. When I move the cursor with the right speed it isn't changed to default pointer sometimes. I tried with OnMouseLeave code for the panel but that didn't help. When I replace the cursor of the embedded control with something else like crCross it runs perfectly. What can I do?
The problem does not occur under Windows.
Lazarus 1.7 (SVN) FPC 3.0.0

zeljko

  • Hero Member
  • *****
  • Posts: 1150
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Default cursor for control doesn't work
« Reply #1 on: May 02, 2012, 12:16:56 pm »
Qt or gtk2 ?

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: Default cursor for control doesn't work
« Reply #2 on: May 02, 2012, 01:01:50 pm »
Gtk2. I'll check Qt this evening.
Lazarus 1.7 (SVN) FPC 3.0.0

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: Default cursor for control doesn't work
« Reply #3 on: May 02, 2012, 07:08:22 pm »
No problem with Qt. Openglcontext not tested since it isn't supported.

PS: I put some controls together and it is an issue with Qt too. To reproduce place a panel on a form and change cursor to crHourGlass. Add a listview to the panel and make it alClient. The cursor will change when moving over the bevel but stays an hourglass at the listview which cursor property is crDefault.

PPS: Arch Linux, KDE 4.8.2
« Last Edit: May 02, 2012, 07:16:06 pm by Ocye »
Lazarus 1.7 (SVN) FPC 3.0.0

zeljko

  • Hero Member
  • *****
  • Posts: 1150
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Default cursor for control doesn't work
« Reply #4 on: May 03, 2012, 07:43:07 am »
That's because qt changes cursor for parent (TPanel) and then to all of it's children all the time.

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: Default cursor for control doesn't work
« Reply #5 on: May 03, 2012, 01:05:07 pm »
Is it good to link cursor to parent? I don't think so but I should blame Qt for that. Or XOrg?

The question remains: How do I use the proper default cursor for embedded controls?
Lazarus 1.7 (SVN) FPC 3.0.0

 

TinyPortal © 2005-2018