DCMXPUSHBUTTON With DCSUBMENU ... need to HIDE the SubMenu

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
GeneB
Posts: 158
Joined: Sun Jan 31, 2010 8:32 am
Location: Albuquerque, New Mexico, USA
Contact:

DCMXPUSHBUTTON With DCSUBMENU ... need to HIDE the SubMenu

#1 Post by GeneB »

I am using DCMXPUSHBUTTON with DCSUBMENU (Samples Group 6)

I can HIDE the MXPushButton, but since there is no HIDE in DCSUBMENU, the button for DCSUBMENU stays on the screen.
Is there a way to hide the DCSUBMENU button?

John Hohensee
Posts: 26
Joined: Fri Mar 04, 2011 7:35 am
Location: San Bernardino, CA USA
Contact:

Re: DCMXPUSHBUTTON With DCSUBMENU ... need to HIDE the SubMenu

#2 Post by John Hohensee »

Use WHEN {|| Something() }
If this returns a TRUE the menu works, otherwise it grayed and disabled.

User avatar
GeneB
Posts: 158
Joined: Sun Jan 31, 2010 8:32 am
Location: Albuquerque, New Mexico, USA
Contact:

Re: DCMXPUSHBUTTON With DCSUBMENU ... need to HIDE the SubMenu

#3 Post by GeneB »

Thanks, but I would like to HIDE it.
With the main button hidden, a 'grayed' button with choices to 'nowhere' on the screen isn't right.

-=# GeneB

User avatar
GeneB
Posts: 158
Joined: Sun Jan 31, 2010 8:32 am
Location: Albuquerque, New Mexico, USA
Contact:

Re: DCMXPUSHBUTTON With DCSUBMENU ... need to HIDE the SubMenu

#4 Post by GeneB »

I came up with a poor man's solution.

When the DCMXBUTTON is hidden:

disable the SUBMENU with WHEN
DCSAY over the top of the SUBMENU button
use a HIDE clause in the DCSAY to remove it when you want to see the SUBMENU

Not pretty, but whatever works and move on.

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCMXPUSHBUTTON With DCSUBMENU ... need to HIDE the SubMenu

#5 Post by rdonnay »

Why are you using DCMXPUSHBUTTON instead of DCPUSHBUTTONXP ?

I haven't supported DCMXPUSHBUTTON in a long time because I didn't write it.
The eXpress train is coming - and it has more cars.

User avatar
GeneB
Posts: 158
Joined: Sun Jan 31, 2010 8:32 am
Location: Albuquerque, New Mexico, USA
Contact:

Re: DCMXPUSHBUTTON With DCSUBMENU ... need to HIDE the SubMenu

#6 Post by GeneB »

I used it because I found it on Xdemo, Sample Group 6, MxPushButtons, and it is in the docmentation.

I liked it because I have a "Print" button on a screen, and the dropdown menu that this functioun has allows me to give a "print with details" and a "print without details" choice.

Is there another way to do this without DCMXPUSHBUTTON, and without having two print buttons on the screen?

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: DCMXPUSHBUTTON With DCSUBMENU ... need to HIDE the SubMenu

#7 Post by rdonnay »

Is there another way to do this without DCMXPUSHBUTTON, and without having two print buttons on the screen?
DCPUSHBUTTONXP supports that functionality and more.

Run the sample program: \exp19\samples\buttonxp\buttonxp.exe
The eXpress train is coming - and it has more cars.

User avatar
GeneB
Posts: 158
Joined: Sun Jan 31, 2010 8:32 am
Location: Albuquerque, New Mexico, USA
Contact:

Re: DCMXPUSHBUTTON With DCSUBMENU ... need to HIDE the SubMenu

#8 Post by GeneB »

Wow, where did all that come from? I had no idea.
And I thought I was impressed with Express before I saw all this.
Now I'm blown away with the tools available.

Thanks Roger !!!

Post Reply