newsgroups-index (beta)

Current group: dbase.programming

Enable / Disable Popup Menu items

Enable / Disable Popup Menu items  
Heinz Kesting
 Re: Enable / Disable Popup Menu items  
Don Skupsky
 Re: Enable / Disable Popup Menu items  
Heinz Kesting
 Re: Enable / Disable Popup Menu items  
Jan Hoelterling
 Re: Enable / Disable Popup Menu items  
Heinz Kesting
From:Heinz Kesting
Subject:Enable / Disable Popup Menu items
Date:Thu, 13 Jan 2005 16:38:10 +0100
Hi everybody,
I'm trying to enable / disable a menu item which has a submenu. The 4 menu
items of the submenu will be disabled quiet right, but the item of the main
menu remains enabled.
Here's the code section

_app.main.pop_GrArc1.m_index.r_nr.enabled = false // subitem
_app.main.pop_GrArc1.m_index.r_date.enabled = false // subitem
_app.main.pop_GrArc1.m_index.r_art.enabled = false // subitem
_app.main.pop_GrArc1.m_index.r_sum.enabled = false // subitem
_app.main.pop_GrArc1.m_index.enabled = false

Any ideas why this happens?

Thanks for helping, Heinz
From:Don Skupsky
Subject:Re: Enable / Disable Popup Menu items
Date:Thu, 13 Jan 2005 11:38:37 -0700
Unfortunately, in order to disable a menu item with submenu-items on a popup
menu, you have to "release" the submenu items first, then set enable=false
on the menu item. I complained about this some three years ago, but nothing
has changed. So, I believe your only solution is this type of workaround.

I use the "ROOT_onInitMenu" event to check for conditions and release the
submenu-items as needed.
________________________________
Don Skupsky
Information Requirements Clearinghouse
"Heinz Kesting" wrote in message
news:0FsklXY#EHA.876@news-server...
Hi everybody,
I'm trying to enable / disable a menu item which has a submenu. The 4 menu
items of the submenu will be disabled quiet right, but the item of the main
menu remains enabled.
Here's the code section

_app.main.pop_GrArc1.m_index.r_nr.enabled = false // subitem
_app.main.pop_GrArc1.m_index.r_date.enabled = false // subitem
_app.main.pop_GrArc1.m_index.r_art.enabled = false // subitem
_app.main.pop_GrArc1.m_index.r_sum.enabled = false // subitem
_app.main.pop_GrArc1.m_index.enabled = false

Any ideas why this happens?

Thanks for helping, Heinz
From:Heinz Kesting
Subject:Re: Enable / Disable Popup Menu items
Date:Thu, 13 Jan 2005 22:17:48 +0100
Hi Don,
> Unfortunately, in order to disable a menu item with submenu-items on a
popup
> menu, you have to "release" the submenu items first, then set enable=false
> on the menu item. I complained about this some three years ago, but
nothing
> has changed. So, I believe your only solution is this type of workaround.
>
> I use the "ROOT_onInitMenu" event to check for conditions and release the
> submenu-items as needed.

Thank you for your help. I thought I was still doing wrong. I will try your
workaround, it sounds good.

Thanks once more, Heinz
From:Jan Hoelterling
Subject:Re: Enable / Disable Popup Menu items
Date:Thu, 13 Jan 2005 10:30:45 -0600
Heinz,

as far as I know, this is Windows standard behaviour. I've run into this
myself and have not found a way around it.

Jan
From:Heinz Kesting
Subject:Re: Enable / Disable Popup Menu items
Date:Thu, 13 Jan 2005 18:10:22 +0100
Hi Jan

> as far as I know, this is Windows standard behaviour. I've run into this
> myself and have not found a way around it.

I had found the thread fom Frank Goris from 05.01.05 which was about the
same problem, but not with popups. Here Bowen Moursund wrote ...

If a menu item contains a submenu, all of the submenu's items must be
disabled first.

So I thought this would apply to popups as well. I've not seen other popups
behaving this way, unfortunately I have no example to check on ...

Thanks, anyway
Heinz
   

Copyright © 2006 newsgroups-index   -   All rights reserved   -   Impressum