Recent

Author Topic: [Solved] ListView columns render '_' wrong  (Read 1538 times)

Alextp

  • Hero Member
  • *****
  • Posts: 884
    • UVviewsoft
[Solved] ListView columns render '_' wrong
« on: January 15, 2019, 08:07:49 am »
Seems some GTK2 caveat. name "work_local" in column title of listview. Shows as "worklocal" with underlined "l" char.
Pls fix.
« Last Edit: January 16, 2019, 03:29:12 pm by Alextp »

lucamar

  • Hero Member
  • *****
  • Posts: 2076
It's a widgetset gotcha, I think. IIRC the underline character is used in the GTK API for the same purpose the ampersand is in the Windows API.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

Alextp

  • Hero Member
  • *****
  • Posts: 884
    • UVviewsoft
https://developer.gnome.org/gtk3/3.5/GtkButton.html

If characters in label are preceded by an underscore, they are underlined. If you need a literal underscore character in a label, use “__” (two underscores). The first underlined character represents a keyboard accelerator called a mnemonic.

//Maybe will try making a patch

Alextp

  • Hero Member
  • *****
  • Posts: 884
    • UVviewsoft
Fix here https://bugs.freepascal.org/view.php?id=34882
Someone pls adapt it for Gtk3 (I cannot compile it)