Forum > Designer

Bugs in Example Projects window

<< < (2/15) > >>

JuhaManninen:

--- Quote from: Aruna on December 05, 2022, 02:50:01 pm ---Juha please have a look at this, we already have this functionality built in to TListBox: TListBox built-in search+filter functionality

--- End quote ---
No we don't. Please see my answer in the other thread. Why do you call it search+filter functionality while it is only a search?

Aruna:

--- Quote from: JuhaManninen on December 05, 2022, 06:53:04 pm ---
--- Quote from: Aruna on December 05, 2022, 02:50:01 pm ---Juha please have a look at this, we already have this functionality built in to TListBox: TListBox built-in search+filter functionality

--- End quote ---
No we don't. Please see my answer in the other thread. Why do you call it search+filter functionality while it is only a search?

--- End quote ---
I thought it was both but I guess I was wrong :-(

dbannon:
===== LazarusDirectory ======

--- Quote from: JuhaManninen on December 05, 2022, 10:36:37 am ---Earlier (issue #39671) I tried to change the logic for this exact same LazarusDirectory but it caused a regression.

--- End quote ---
You told me you had fixed it. And from memory, it needed to be fixed. But you did not tell me you reverted that fix.  Thanks very much.

background : Initially, direct access to LazarusDirectory was not available, Getmen eventually either found a way or made a way but by that stage, my code was in the review pipeline.
https://forum.lazarus.freepascal.org/index.php/topic,57680.msg434967.html#msg434967
Clearly I should have gone back to it but I was traveling then and time was a rare commodity. But with a fix applied to the LazarusDirectory name issue, it was not critical.  :-[


--- Quote from: JuhaManninen on December 05, 2022, 10:36:37 am ---I still wonder why nobody else noticed this problem.

--- End quote ---
Well, in my case I am not using trunk for day to day work anymore because of this https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39540
The problem only shows up if you are using the default location for PCP. Most trunk users have it as a second install and its config is redirected. Certainly in my case.

======= Search Prompt ========

--- Quote from: wp on December 05, 2022, 04:27:02 pm ---Such a hint text should not be stored in the Edit.Text itself but in the Edit.TextHint which is displayed in grayed-out style as long as Edit.Text is empty (https://lazarus-ccr.sourceforge.io/docs/lcl/stdctrls/tcustomedit.texthint.html).

--- End quote ---

yes, Martin_fr also mentioned textHint. I quote its extensive documentation -
TextHint fills the TCustomEdit with the value assigned to it, whenever the control's Text property is empty and the control does not have focus.

When the Example Window opens, I want the EditSearch to have Focus. Its the component the end user is most likely to want to use. But when an Edit control has Focus, the TextHint is not shown.

I also found using TextHint seemed to introduce some quite unexpected instabilities. Further research is indicated.

So, I coded the equivalent myself. This is the way most other systems work these days. The 'hint' is show until the user starts typing, on the first press of a character, the Prompt is removed. https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40034.  This would a lot more intuitive if I could get that Prompt to be automatically selected when the user clicks back into the control but selecting it in OnEnter fails, I am still trying to find out why.

I think I will make a small dummy app just demonstrating TEdit and see where that leads.

Davo

 

wp:

--- Quote from: dbannon on December 05, 2022, 11:41:03 pm ---But when an Edit control has Focus, the TextHint is not shown.

--- End quote ---
Yes, this is in the docs, but in fact, the TextHint IS shown for the focused Edit on Windows and cocoa. This is different from Delphi. The TextHint is not shown on gtk2/gkt3, though (did not not test the qt's). It would be better if we'd have a consistent behaviour here.

dbannon:

--- Quote from: wp on December 06, 2022, 12:17:25 am ---
--- Quote from: dbannon on December 05, 2022, 11:41:03 pm ---But when an Edit control has Focus, the TextHint is not shown.

--- End quote ---
Yes, this is in the docs, but in fact, the TextHint IS shown for the focused Edit on Windows and cocoa. This is different from Delphi. The TextHint is not shown on gtk2/gkt3, though (did not not test the qt's). It would be better if we'd have a consistent behaviour here.

--- End quote ---
Thanks WP.
Yes, thats what I have found although only tested on GTK2, Qt5 and Windows so far. Qt5 is OK too so its "only" a GTK2/3 issue.

So, I have some workable code but I am not exactly happy with it. Have to support GTK and drag the others down (or ifdef all over the place).

To make it usable in GTK2/GTK3, IMHO, I need to alter the tab order, have initial focus on the ListView (so the texthint shows) and first tab stop after that is the EditSearch. Thats fine so far, maybe even reasonably intuitive. But then tabbing back to the ListView (from the EditSearch) is hopeless if you have all the checkboxes and buttons as tabstop.

(Please look away now Aruna)
Does anyone seriously try and use these interfaces without a mouse ? Or choose tabbing rather than clicking 'cos its faster ? Using the mouse is flawless.

Anyway, I will graft this new model into my full test install and see if I like it, if I do, I will push another patch up in place of the previous one. Maybe later today unless someone has a better approach to suggest.

Right now, I need to go out and cut some firewood before it gets too hot.

Davo

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version