Recent

Author Topic: How to allow users select text when TLabeledEdit is read only?  (Read 11025 times)

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: How to allow users select text when TLabeledEdit is read only?
« Reply #15 on: July 19, 2015, 01:28:42 pm »
Please test with latest stable version (currently 1.4.2), or with trunk, and if the problem is still there then open a ticket about this in the bugtracker, so it gets the attention of the developers and can be fixed properly.
[...]
:o
Are you sure ? There really bugs in the system ?
And get the attention ? Or not ... or you are told to live with it ...
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4709
  • I like bugs.
Re: How to allow users select text when TLabeledEdit is read only?
« Reply #16 on: July 19, 2015, 02:07:47 pm »
Are you sure ? There really bugs in the system ?

Yes! There are now 1663 open issues for Lazarus project alone.
"Hide Status : resolved (and above)" :
  http://bugs.freepascal.org/view_all_bug_page.php

Quote
And get the attention ? Or not ... or you are told to live with it ...

No, but you may be asked to fix it yourself and provide a patch. :)
Carbon and Cocoa widgetsets have many open bugs, contributions would be welcome.
This is a volunteer based open source project. Anybody can fix bugs if they feel so.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Bart

  • Hero Member
  • *****
  • Posts: 5713
    • Bart en Mariska's Webstek
Re: How to allow users select text when TLabeledEdit is read only?
« Reply #17 on: July 19, 2015, 02:24:33 pm »
Are you sure ? There really bugs in the system ?
And get the attention ? Or not ... or you are told to live with it ...

Why use such an offencing tone? (C'est le ton qui fait la musique...)

Obviously the original poster has hit something that does not work as expected.
Bugs repoted here are easily forgotten.
Bugs reported in the bugtracker are not.

That does not mean they are fixed instantly, once reported.
Some bugs cannot be reproduced easily, some widgetsets have more active developers than others, some problems are harder than others, etc. etc.

As Juha said: developing Lazaus (and hence fixing bugs) is done by volunteers, mostly in our spare time.
It's easy to criticize, but it's harder to contribute.

Bart

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: How to allow users select text when TLabeledEdit is read only?
« Reply #18 on: July 19, 2015, 08:00:41 pm »
Why use such an offencing tone? (C'est le ton qui fait la musique...)
Sorry, i didn't want to offend anybody.
Didn't you see the Smiley ?
I only wanted to tickle a little.

At first it looked like a normal question, but later it looked more, and more like a bug.
But since i'm on PC Win/Linux I cannot contribute a patch.
And until the problem is solved/patched, dzywendy needs a workaround.
Which I offered. So I am actually contributing.

PS.: I Was told, that a bug is actually none, and I have to live with it. (with more words of cause)
[Edit]
PPS: I know that in any none-trivial program there is nonzero amount of bugs.
If somebody tells you otherwise, highly probable he's a lair,
because proofing a program takes nearly infinity resources. (In normal circumstances you can't afford these )
There are only thoroughly tested programs.
« Last Edit: July 19, 2015, 08:13:16 pm by jc99 »
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

Leledumbo

  • Hero Member
  • *****
  • Posts: 8836
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to allow users select text when TLabeledEdit is read only?
« Reply #19 on: July 19, 2015, 08:36:43 pm »
But since i'm on PC Win/Linux I cannot contribute a patch.
Umm...why can't you? :-[

rvk

  • Hero Member
  • *****
  • Posts: 6989
Re: How to allow users select text when TLabeledEdit is read only?
« Reply #20 on: July 19, 2015, 09:01:39 pm »
But since i'm on PC Win/Linux I cannot contribute a patch.
Umm...why can't you? :-[
Because on Windows/Linux there is no problem (and selecting text in a read-only TLabeledEdit is no problem at all on Windows). And I can imagine creating a patch for an OS on which you can't test is really hard to do.

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: How to allow users select text when TLabeledEdit is read only?
« Reply #21 on: July 19, 2015, 09:17:20 pm »
Umm...why can't you? :-[
Because on Windows/Linux there is no problem (and selecting text in a read-only TLabeledEdit is no problem at all on Windows). And I can imagine creating a patch for an OS on which you can't test is really hard to do.
Dito, and submitting a patch you can't test is no good style either.
[Edit]
I will contribute patches, but on this specific problem it's something different.
I even looked if i could get an OS x running in a VM - But so far I only found solutions with VM-Workstation which you has to be patched to support OS x  and then ... and then ... and hope that all is ok ...
« Last Edit: July 19, 2015, 09:25:02 pm by jc99 »
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

dzywendy

  • New member
  • *
  • Posts: 7
Re: How to allow users select text when TLabeledEdit is read only?
« Reply #22 on: July 21, 2015, 09:30:06 pm »
67 is just the number, #67 is the character number 67: 'C', Capital-C to be exact.
On PC the Control-Keys are coded from #1 - Ctrl-A (Sometimes Mark all) to #26 Ctrl-Z (EOF)
On some programs Ctrl-M #13 is equal to <Enter> (but apparently not to the browser)
You could make some tests, just make a brakepoint in the first line of OnKeyPress and inspect the value of key.
Maybe when you hit c  you get #99, but that's just a guess.

In KeyDown you get the Key-Value and the Shift-State, In Keypress, you get the correlated Character-Value.
  in the Shift-State you get the state of all Extra-Keys (Shift, Ctrl, Alt, and maybe the Apple-Command-Key)

I see! I got it. Thank you.
I finally got access to a PC and I debugged the program. I just set the TLabeledEdit to readonly, and all problem solved. So putting all the KeyDown and KeyPress in a {$ifdef darwin} should do it. It's so much easier in Windows to deal with this.
Mac OS X Yosemite 10.10.4, Lazarus 1.4.2, FPC 2.6.4, Carbon

dzywendy

  • New member
  • *
  • Posts: 7
Re: How to allow users select text when TLabeledEdit is read only?
« Reply #23 on: July 21, 2015, 09:40:30 pm »

No, but you may be asked to fix it yourself and provide a patch. :)
Carbon and Cocoa widgetsets have many open bugs, contributions would be welcome.
This is a volunteer based open source project. Anybody can fix bugs if they feel so.

I wish I'm advanced at this enough to write a patch! Although knowing Free Pascal from before, This is actually my first Lazarus application with GUI. jc99 definitely contributed by helping me with this bug! It shouldn't be something too hard to fix. Programming is just a hobby for me and I've never had computer science courses in college, but I plan to do it more, and maybe be one of the volunteers later.
Mac OS X Yosemite 10.10.4, Lazarus 1.4.2, FPC 2.6.4, Carbon

 

TinyPortal © 2005-2018