Re: Get rid of cursor in Label
- From: "David Necas (Yeti)" <yeti physics muni cz>
- To: gtk-list gnome org
- Subject: Re: Get rid of cursor in Label
- Date: Sun, 26 Jun 2005 11:41:23 +0200
On Sun, Jun 26, 2005 at 10:21:51AM +0200, Preben Randhol wrote:
>
> My problem was that GTK automatically chose the label to have
> focus every time. I solved it by grabing focus on the scrolledwindow in
> stead. I want the text to be selectable in case somebody wants to copy
> it, but I don't want to have the cursor there initially as it clutters
> the text.
>
> How is GTK deciding what to give focus if no Grab_Focus[*] has been used? Does
> buttons have precidence?
Default button has some precedence in dialogs, but that's
more or less a GtkDialog trick.
Otherwise it depends on focus chain -- the first widget in
focus chain gets focus (see e.g. gtk_container_set_focus_chain()).
So your label probably was the first focusable widget in the
window. For change of initial focus your solution is IMHO
good.
> Another question. For a scrolledwindow PageUp and PageDown works to
> scroll up and down, but not the arrow keys. Do one have to bind this
> manually?
Yes, and of course if you have a scrolled window packed with
spin buttons, then up arrow cannot scroll the window and
increment spin button value at the same time (not mentioning
to move focus between widgets), so it depends on what's
inside whether it makes sense.
Yeti
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]