comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Highlighting words in a GtkAda Text_View
Date: Thu, 12 Mar 2020 18:33:35 +0100
Date: 2020-03-12T18:33:35+01:00	[thread overview]
Message-ID: <r4drpg$m64$1@gioia.aioe.org> (raw)
In-Reply-To: e39cb589-d4c4-4be8-8fe3-9bafc3882378@googlegroups.com

On 2020-03-12 18:06, Stephen Davies wrote:
> On Tuesday, 10 March 2020 11:55:33 UTC, Stephen Davies  wrote:
>> I have created a simple GtkAda GUI which contains a read-only Text_View
>> widget. The Text_View consists of a few lines which end with strings of
>> the format "= ABC123x\*.ext". When a user double-clicks over the
>> numeric part, only the "123" section is highlighted. I would prefer
>> either the "ABC123x" section or the "ABC123x\*.ext" section to be
>> highlighted. Is this possible (and simple for a Gtk newb like myself)?
> 
> Bump (I'll take the hint and give in if this also gets no replies).

Is it about text selection? If so there is a signal "extend-selection" 
emitted upon. I never used it, but I guess that you can connect to it 
and adjust selection's starting and ending iterators.

See:

https://developer.gnome.org/gtk3/stable/GtkTextView.html#GtkTextView-extend-selection

There is probably no typed form of this signal callback in GtkAda, so 
you should use a general form with GValues.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2020-03-12 17:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10 11:55 Highlighting words in a GtkAda Text_View Stephen Davies
2020-03-12 17:06 ` Stephen Davies
2020-03-12 17:33   ` Dmitry A. Kazakov [this message]
2020-03-12 18:27     ` joviangm
2020-03-13 15:35       ` Stephen Davies
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox