View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000798 | JEDI VCL | 03 Donations | public | 2003-03-12 12:24 | 2004-03-09 02:47 |
| Reporter | boerema1 | Assigned To | user72 | ||
| Priority | normal | Severity | feature | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 3.00 BETA | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0000798: Show entire text as hint in TJvEdit when the control is to small to show the entire text | ||||
| Description | I made some additions to TJvEdit so you can see the entire edit control text when the control is to small to see everything if you go over it with the mouse. | ||||
| Additional Information | I added a function to TJvMaxPixel because it's very similar to the one that's already there to do the work. See the included zip file. | ||||
| Tags | No tags attached. | ||||
|
2003-03-12 12:24
|
JvEdit and JvMaxPixel.zip (6,407 bytes) |
|
|
Will be revisited in JVCL3 |
|
|
How about adding an AutoHint property that just sets the Hint to be equivalent to Text (and is updated as Text changes, of course)? I don't exactly understand the need to preserve the old Hint if Text < Width. I can't think of a scenario where switching between them would be useful. Thoughts? |
|
|
Just the AutoHint is fine by me. Personally I don't need the previous hint to be preserved but I thought maybe someone else might need it. By the way, I seem to remember that the computation of the width is a little bit of. I can't check it though because I haven't yet converted the project where I use this from JVCL 2.1 to 3. |
|
|
OK, I'll do a simple implementation and then we can test if it is enough. If not, we can beef it up as we go along. I'll be back<g> |
|
2004-01-29 10:13
|
JvEditAutoHint.zip (5,328 bytes) |
|
|
Try the attached JvEditAutoHint. It is essentially the same as your initial implementation but without the JvMaxPixel stuff. |
|
|
I think we should use an empty original Hint as an indication that Hint should always be set to Text, even if the text is fully visible, so try adding this to UpdateAutoHint:
if AutoHint and HandleAllocated then
begin
if FOldHint = '' then
begin
Hint := Text;
Exit;
end;
...
|
|
|
I'm really short on time at the moment so I don't know when I will be able to check this. Probably not before the weekend and maybe even later. |
|
|
We have a code freeze coming up (monday probably) after which things like this cannot be added until JVCL3 final is released, so if you can find the time (it won't take many minutes to try it, just rebuild the JvStdCtrls package after updating JvEdit) and report back before mid-sunday, that would be great but not a necessity. It is not such a vital thing that it cannot wait until later. |
|
|
Tell you what: I'll add it just the same and we can then massage it into shape later if needed. edited on: 01-29-04 13:48 |
|
|
Well, I found some time to look at it. I think you need to make some changes: UpdateAutoHint needs to be added to TJvCustomEdit.Change otherwise the changes in the text will not be reflected in the hint In TJvCustomEdit.UpdateAutoHint change this: if FOldHint = '' then begin Hint := Text; Exit; end; to this: if FOldHint <> '' then Exit; Otherwise the Hint will get changed to the text if both AutoHint is true and a Hint text is set. |
|
|
> Otherwise the Hint will get changed to the > text if both AutoHint is true and a Hint text is set. If AutoHint is true, you cannot change the Hint manually. This might be seen as a limitation but it is easy enough - once you know about it - to set AutoHint to false before changing Hint and the set AutoHint to true again. When you think about it, it makes sense that you cannot specify a value for Hint if it is automatically handled for you. Compare to AutoHint in TStatusbar: when set, noone expects to be able to change the value of Statusbar.Panels[0] (BTW, I've already documented this behavior in the help docs) |
|
|
> This might be seen as a limitation but it is easy enough > - once you know about it - to set AutoHint to false before > changing Hint and the set AutoHint to true again. When you > think about it, it makes sense that you cannot specify a > value for Hint if it is automatically handled for you. Ok by me. Seems to work fine now though I haven't tested it extensively. |
|
|
Tested pretty extensively and seems to work satisfactorily |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2004-01-27 02:25 |
|
Status | acknowledged => assigned |
| 2004-01-27 02:25 |
|
Assigned To | => user72 |
| 2004-01-28 15:33 |
|
Note Added: 0002862 | |
| 2004-01-28 16:59 | boerema1 | Note Added: 0002863 | |
| 2004-01-28 22:41 |
|
Note Added: 0002864 | |
| 2004-01-29 10:13 |
|
File Added: JvEditAutoHint.zip | |
| 2004-01-29 10:14 |
|
Note Added: 0002870 | |
| 2004-01-29 10:14 |
|
Status | assigned => feedback |
| 2004-01-29 10:54 |
|
Note Added: 0002873 | |
| 2004-01-29 11:39 | boerema1 | Note Added: 0002874 | |
| 2004-01-29 13:12 |
|
Note Added: 0002876 | |
| 2004-01-29 13:24 |
|
Note Added: 0002878 | |
| 2004-01-29 13:53 |
|
Note Edited: 0002878 | |
| 2004-01-29 22:26 | boerema1 | Note Added: 0002887 | |
| 2004-01-29 23:48 |
|
Note Added: 0002889 | |
| 2004-01-30 13:34 | boerema1 | Note Added: 0002895 | |
| 2004-02-01 00:15 |
|
Status | feedback => resolved |
| 2004-02-01 00:15 |
|
Resolution | open => fixed |
| 2004-02-01 00:15 |
|
Note Added: 0002907 | |
| 2004-03-09 02:47 |
|
Status | resolved => closed |