How would I change the text style in a gedit plugin?
- From: ALLOW THERE <allowthere zoho com>
- To: "gtk-app-devel-list" <gtk-app-devel-list gnome org>
- Subject: How would I change the text style in a gedit plugin?
- Date: Wed, 22 Nov 2017 12:40:14 -0800
I'm a GTK noob, so sorry if I'm asking too much.
I'm trying to change the style of text in gedit through a plugin (sort of like underlining text as in a
spellcheck, or change the color of text).
I have a document like this:
doc = self.window.get_active_document()
Then I get bounds
start, end = doc.get_bounds() num_lines = end.get_line() - start.get_line() + 1 line_start = start.copy() for
i in range(0, num_lines): line_end = line_start.copy() line_end.forward_to_line_end()
doc.create_tag().background="blue" line = line_start.get_slice(line_end) if line.startswith('\n'): line='\n'
lines.append(line) line_start.forward_line()
But the background doesn't change. Is there something else I should do?
Thank you very much
Sent using Zoho Mail
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]