Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

May all your PUSHes be POPped.


devel / comp.lang.tcl / no indicator box in menus

SubjectAuthor
* no indicator box in menuset4
`* no indicator box in menusHarald Oehlmann
 `* no indicator box in menuset4
  `* no indicator box in menusHarald Oehlmann
   `* no indicator box in menusLuc
    `* no indicator box in menuset4
     `- no indicator box in menusLuc

1
no indicator box in menus

<tjf64a$isb$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9921&group=comp.lang.tcl#9921

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!YN2ulY6LKp1eoOUw2OJ8ig.user.46.165.242.91.POSTED!not-for-mail
From: tcln...@rocketship1.me (et4)
Newsgroups: comp.lang.tcl
Subject: no indicator box in menus
Date: Thu, 27 Oct 2022 17:01:13 -0700
Organization: Aioe.org NNTP Server
Message-ID: <tjf64a$isb$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="19339"; posting-host="YN2ulY6LKp1eoOUw2OJ8ig.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: et4 - Fri, 28 Oct 2022 00:01 UTC

Below is a modified example script from the manual on [tk_popup] where I added 2 checkbuttons and 2 radiobuttons. I'm not seeing what the manual describes under the [menu ]command. Are tk_popup's different some how? Or is there something I'm missing to get it to display the "box".

Manual:

"An indicator box is displayed to the left of the label in a checkbutton entry. If the entry is selected then the indicator's center is displayed in the color given by the -selectcolor option for the entry; otherwise the indicator's center is displayed in the background color for the menu."

The problem is that it's not possible to tell from the menu items which are checkboxes or radiobuttons and which are commands, except when the item is selected since there is no "box" as the manual says. Usually one would see a box around a checkmark, or an empty box.

Here is what I see on my pop-os linux, but similar on windows:

https://postimg.cc/LnXh5BDC

# Create a menu
set m [menu .popupMenu]
$m add command -label "Example 1"
$m add command -label "Example 2"
$m add checkbutton -label "Example 3a" -selectcolor red
$m add checkbutton -label "Example 3b" -selectcolor red
$m add radiobutton -label "Example 4" -variable radio -selectcolor red
$m add radiobutton -label "Example 5" -variable radio -selectcolor red
$m add command -label "Example 6"

# Create something to attach it to
pack [label .l -text "Click me!"]

# Arrange for the menu to pop up when the label is clicked
bind .l <1> {tk_popup .popupMenu %X %Y}

Re: no indicator box in menus

<tjgaug$30l94$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9922&group=comp.lang.tcl#9922

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: wortka...@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: no indicator box in menus
Date: Fri, 28 Oct 2022 12:29:37 +0200
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <tjgaug$30l94$1@dont-email.me>
References: <tjf64a$isb$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 28 Oct 2022 10:29:37 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="fce828a621cd1ee85e7f3ca302d91460";
logging-data="3167524"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/WyEVsNvuuDAr18fESmd6O"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.0
Cancel-Lock: sha1:T7sLo1IW7ycvmCvHxF65C4FxqZM=
In-Reply-To: <tjf64a$isb$1@gioia.aioe.org>
Content-Language: en-GB
 by: Harald Oehlmann - Fri, 28 Oct 2022 10:29 UTC

Am 28.10.2022 um 02:01 schrieb et4:
> Below is a modified example script from the manual on [tk_popup] where I
> added 2 checkbuttons and 2 radiobuttons. I'm not seeing what the manual
> describes under the [menu ]command. Are tk_popup's different some how?
> Or is there something I'm missing to get it to display the "box".
>
> Manual:
>
> "An indicator box is displayed to the left of the label in a checkbutton
> entry. If the entry is selected then the indicator's center is displayed
> in the color given by the -selectcolor option for the entry; otherwise
> the indicator's center is displayed in the background color for the menu."
>
> The problem is that it's not possible to tell from the menu items which
> are checkboxes or radiobuttons and which are commands, except when the
> item is selected since there is no "box" as the manual says. Usually one
> would see a box around a checkmark, or an empty box.

I fear, your observation is intended behaviour.
On Windows, native menus are used and that's the way, it is done on
Windows usually.
To mark a group of radio buttons, you can:
- initialize the variable, so one is checked at the beginning.
- add separator lines to group the radio-button region
- or put the radio-buttons into a sub-menu.

Thank you and take care,
Harald

Re: no indicator box in menus

<tjhgpb$okh$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9923&group=comp.lang.tcl#9923

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!YN2ulY6LKp1eoOUw2OJ8ig.user.46.165.242.91.POSTED!not-for-mail
From: tcln...@rocketship1.me (et4)
Newsgroups: comp.lang.tcl
Subject: Re: no indicator box in menus
Date: Fri, 28 Oct 2022 14:15:22 -0700
Organization: Aioe.org NNTP Server
Message-ID: <tjhgpb$okh$1@gioia.aioe.org>
References: <tjf64a$isb$1@gioia.aioe.org> <tjgaug$30l94$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="25233"; posting-host="YN2ulY6LKp1eoOUw2OJ8ig.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: et4 - Fri, 28 Oct 2022 21:15 UTC

On 10/28/2022 3:29 AM, Harald Oehlmann wrote:
> Am 28.10.2022 um 02:01 schrieb et4:
>> Below is a modified example script from the manual on [tk_popup] where I added 2 checkbuttons and 2 radiobuttons. I'm not seeing what the manual describes under the [menu ]command. Are tk_popup's different some how? Or is there something I'm missing to get it to display the "box".
>>
>> Manual:
>>
>> "An indicator box is displayed to the left of the label in a checkbutton entry. If the entry is selected then the indicator's center is displayed in the color given by the -selectcolor option for the entry; otherwise the indicator's center is displayed in the background color for the menu."
>>
>> The problem is that it's not possible to tell from the menu items which are checkboxes or radiobuttons and which are commands, except when the item is selected since there is no "box" as the manual says. Usually one would see a box around a checkmark, or an empty box.
>
> I fear, your observation is intended behaviour.
> On Windows, native menus are used and that's the way, it is done on Windows usually.
> To mark a group of radio buttons, you can:
> - initialize the variable, so one is checked at the beginning.
> - add separator lines to group the radio-button region
> - or put the radio-buttons into a sub-menu.
>
> Thank you and take care,
> Harald

Thanks, I've decided to add a little unicode box for checkboxes, and one with a dot inside it for the radio buttons. Command entries will just use a space where the box would go. The checkmark will have to be beside them however. As suggested, I'm using separators to group the radio buttons.

Strange, I know I've seen tk code with these indicators before. Wonder when this changed.

Re: no indicator box in menus

<tjitaj$3e60d$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9924&group=comp.lang.tcl#9924

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: wortka...@yahoo.com (Harald Oehlmann)
Newsgroups: comp.lang.tcl
Subject: Re: no indicator box in menus
Date: Sat, 29 Oct 2022 11:55:33 +0200
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <tjitaj$3e60d$1@dont-email.me>
References: <tjf64a$isb$1@gioia.aioe.org> <tjgaug$30l94$1@dont-email.me>
<tjhgpb$okh$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 29 Oct 2022 09:55:31 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="5fea5ecb0c67687efbfdc48d1df2240b";
logging-data="3610637"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18oKwflpmr71X/OUzpJtKrP"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.4.0
Cancel-Lock: sha1:sU8T29/z8jr40akckW1zZkxrKcg=
Content-Language: en-GB
In-Reply-To: <tjhgpb$okh$1@gioia.aioe.org>
 by: Harald Oehlmann - Sat, 29 Oct 2022 09:55 UTC

Am 28.10.2022 um 23:15 schrieb et4:
> Thanks, I've decided to add a little unicode box for checkboxes, and one
> with a dot inside it for the radio buttons. Command entries will just
> use a space where the box would go. The checkmark will have to be beside
> them however. As suggested, I'm using separators to group the radio
> buttons.
>
> Strange, I know I've seen tk code with these indicators before. Wonder
> when this changed.

On some Linux themes, you will have it. Good old Motiv had it.
But on Windows, you have no choice, only native menues available, and
they only show a blank field.

I don't know, if you can use non-native menus on Windows. Other may
advice. This would have a lot of advantages, like font scaling, colours,
and the boxes you are asking for.

Take care,
Harald

Re: no indicator box in menus

<20221029072526.50b6b838@lud1.home>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9925&group=comp.lang.tcl#9925

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!p4FB1SABcbjjC3smfJSmyg.user.46.165.242.75.POSTED!not-for-mail
From: no...@no.no (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: no indicator box in menus
Date: Sat, 29 Oct 2022 07:25:26 -0300
Organization: Aioe.org NNTP Server
Message-ID: <20221029072526.50b6b838@lud1.home>
References: <tjf64a$isb$1@gioia.aioe.org>
<tjgaug$30l94$1@dont-email.me>
<tjhgpb$okh$1@gioia.aioe.org>
<tjitaj$3e60d$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="39130"; posting-host="p4FB1SABcbjjC3smfJSmyg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu)
X-Notice: Filtered by postfilter v. 0.9.2
 by: Luc - Sat, 29 Oct 2022 10:25 UTC

On Sat, 29 Oct 2022 11:55:33 +0200, Harald Oehlmann wrote:

> On some Linux themes, you will have it. Good old Motiv had it.
> But on Windows, you have no choice, only native menues available, and
> they only show a blank field.
>
> I don't know, if you can use non-native menus on Windows. Other may
> advice. This would have a lot of advantages, like font scaling, colours,
> and the boxes you are asking for.
>
> Take care,
> Harald

Harald makes an interesting comment. First, he mentions only native menus
available on Windows, then he mentions font scaling.

So I edited the original code just adding -font options. I used a large font
and it works. Of course, I'm on Linux.

And that made me think: if this widget and how it's going to look really
matters to you, then why not make your own menu? I mean, instead of using
the 'menu' command, make a new window with a frame and/or a canvas and add
your checkbuttons and radiobuttons and whatever you want, groom it however
you want and make the whole thing look like whatever you want. Then you
just have to run a little calculation to determine where it's going to pop
up like a real menu would. It's a little bit more of work, but hey, looks
do matter. Tcl/Tk will let you do that.

--
Luc
>>

Re: no indicator box in menus

<tjkqqa$1u0b$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9929&group=comp.lang.tcl#9929

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!YN2ulY6LKp1eoOUw2OJ8ig.user.46.165.242.91.POSTED!not-for-mail
From: tcln...@rocketship1.me (et4)
Newsgroups: comp.lang.tcl
Subject: Re: no indicator box in menus
Date: Sat, 29 Oct 2022 20:24:58 -0700
Organization: Aioe.org NNTP Server
Message-ID: <tjkqqa$1u0b$1@gioia.aioe.org>
References: <tjf64a$isb$1@gioia.aioe.org> <tjgaug$30l94$1@dont-email.me>
<tjhgpb$okh$1@gioia.aioe.org> <tjitaj$3e60d$1@dont-email.me>
<20221029072526.50b6b838@lud1.home>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="63499"; posting-host="YN2ulY6LKp1eoOUw2OJ8ig.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: et4 - Sun, 30 Oct 2022 03:24 UTC

On 10/29/2022 3:25 AM, Luc wrote:
> On Sat, 29 Oct 2022 11:55:33 +0200, Harald Oehlmann wrote:
>
>> On some Linux themes, you will have it. Good old Motiv had it.
>> But on Windows, you have no choice, only native menues available, and
>> they only show a blank field.
>>
>> I don't know, if you can use non-native menus on Windows. Other may
>> advice. This would have a lot of advantages, like font scaling, colours,
>> and the boxes you are asking for.
>>
>> Take care,
>> Harald
>
>
> Harald makes an interesting comment. First, he mentions only native menus
> available on Windows, then he mentions font scaling.
>
> So I edited the original code just adding -font options. I used a large font
> and it works. Of course, I'm on Linux.
>
> And that made me think: if this widget and how it's going to look really
> matters to you, then why not make your own menu? I mean, instead of using
> the 'menu' command, make a new window with a frame and/or a canvas and add
> your checkbuttons and radiobuttons and whatever you want, groom it however
> you want and make the whole thing look like whatever you want. Then you
> just have to run a little calculation to determine where it's going to pop
> up like a real menu would. It's a little bit more of work, but hey, looks
> do matter. Tcl/Tk will let you do that.
>
>

Which font did you use. I tried several including courier and consolas (not sure what linux really used there) and there are still no indicator boxes. I tried a huge size too, 36 pt, and while the 7 menu items got very large, the check box was tiny, almost couldn't see it.

My concern is not so much in how they look, just that a user should feel safe clicking on a checkbox, but might wonder what's going to happen if it's a command. That's why I want an indicator box. My workaround shows the user which ones are checkboxes and radio buttons now. So, it ends up looking strange with the checkmark next to the box rather than inside it, but I think a user will be able to figure it out.

thanks

Re: no indicator box in menus

<20221030011527.0b415fab@lud1.home>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=9932&group=comp.lang.tcl#9932

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!u9eMF+oymJzF4rLzEfa7uw.user.46.165.242.75.POSTED!not-for-mail
From: no...@no.no (Luc)
Newsgroups: comp.lang.tcl
Subject: Re: no indicator box in menus
Date: Sun, 30 Oct 2022 01:15:27 -0300
Organization: Aioe.org NNTP Server
Message-ID: <20221030011527.0b415fab@lud1.home>
References: <tjf64a$isb$1@gioia.aioe.org>
<tjgaug$30l94$1@dont-email.me>
<tjhgpb$okh$1@gioia.aioe.org>
<tjitaj$3e60d$1@dont-email.me>
<20221029072526.50b6b838@lud1.home>
<tjkqqa$1u0b$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="19928"; posting-host="u9eMF+oymJzF4rLzEfa7uw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
X-Newsreader: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu)
 by: Luc - Sun, 30 Oct 2022 04:15 UTC

On Sat, 29 Oct 2022 20:24:58 -0700, et4 wrote:

> On 10/29/2022 3:25 AM, Luc wrote:
> > On Sat, 29 Oct 2022 11:55:33 +0200, Harald Oehlmann wrote:
> >
> >> On some Linux themes, you will have it. Good old Motiv had it.
> >> But on Windows, you have no choice, only native menues available, and
> >> they only show a blank field.
> >>
> >> I don't know, if you can use non-native menus on Windows. Other may
> >> advice. This would have a lot of advantages, like font scaling,
> >> colours, and the boxes you are asking for.
> >>
> >> Take care,
> >> Harald
> >
> >
> > Harald makes an interesting comment. First, he mentions only native
> > menus available on Windows, then he mentions font scaling.
> >
> > So I edited the original code just adding -font options. I used a large
> > font and it works. Of course, I'm on Linux.
> >
> > And that made me think: if this widget and how it's going to look really
> > matters to you, then why not make your own menu? I mean, instead of
> > using the 'menu' command, make a new window with a frame and/or a
> > canvas and add your checkbuttons and radiobuttons and whatever you
> > want, groom it however you want and make the whole thing look like
> > whatever you want. Then you just have to run a little calculation to
> > determine where it's going to pop up like a real menu would. It's a
> > little bit more of work, but hey, looks do matter. Tcl/Tk will let you
> > do that.
> >
> >
>
> Which font did you use. I tried several including courier and consolas
> (not sure what linux really used there) and there are still no indicator
> boxes. I tried a huge size too, 36 pt, and while the 7 menu items got
> very large, the check box was tiny, almost couldn't see it.
>
> My concern is not so much in how they look, just that a user should feel
> safe clicking on a checkbox, but might wonder what's going to happen if
> it's a command. That's why I want an indicator box. My workaround shows
> the user which ones are checkboxes and radio buttons now. So, it ends up
> looking strange with the checkmark next to the box rather than inside it,
> but I think a user will be able to figure it out.
>
> thanks
************************

I am sorry I misled you with my bad wording. When I said "it works" I
really meant that the large font worked after Harald had said that Windows
would have font scaling issues. Just that. The checkboxes and radiobuttons
didn't work for me either.

You have concern for the looks if you think the current look is going to
confuse the user. You definitely need something that looks like what it is
intended. I say you should fashion your own menu.

--
Luc
>>

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor