×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to disable buttons on the toolbar!

How to disable buttons on the toolbar!

How to disable buttons on the toolbar!

(OP)
I have a toolbar on the main window (MDI form) and there is a button on this toolbar. When user clicks the button, a child window will be shown and the button will be disabled.
I did this part. But when that child window closed, the button on the toolbar must be enabled. I tried to enable it in the "Close Event" of the child window but I'm getting an error message like "Unknown identifier ?Button14".
How can I access a button on the toolbar from a child window?

RE: How to disable buttons on the toolbar!

Try placing the code on an embed point from the button on the main menu.  You place it there after the code to pull up the child, then when it returns from the child it will execute this code.

RE: How to disable buttons on the toolbar!

Well, you must to try SETTARGET.

something like

SETTARGET(,1)
0{PROP:STATUSTEXT,1} = 'Change the status text'
SETTARGET

As you know, the FEQ number, is assigned at every control into the window, where 0 always is the windows itself, every control after will be a number (FEQ).

vrg: A Window with an OK and an CANCEL button:
Windows will be 0
IF "TAB" order is OK then CANCEL button:
OK button will be 1
CANCEL button will be 2

so you can change the text to button CANCEL this way:
2{PROP:TEXT} = 'CANCELAR'

and change to flat the OK button:
1{PROP:FLAT} = TRUE

finally change the icon to the window:
0{PROP:ICON} = ICON:PRINT

So, you can disable control from every window, by just knowing the thread number of the window, and the FEQ of the control.
You can put something like this on your tool's bar button to know it's FEQ

MESSAGE(?{PROP:USE,2})

ALWAYS on MDI the Main Windows has the Thread No. 1

You code should be like:

SETTARGET(,1)
ButtonFEQ{PROP:DISABLE} = FALSE
SETTARGET

Saludos, CabrĂ³n!.

-----
carabez@hotmail.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close