RE: Disabling Certain Title bar controls
RE: Disabling Certain Title bar controls
- Subject: RE: Disabling Certain Title bar controls
- From: <email@hidden>
- Date: Mon, 17 Jul 2006 15:24:43 +0530
- Thread-topic: Disabling Certain Title bar controls
Hi,
>standardWindowButton, might be helpful for you.
>Send the constant NSWindowCloseButton and get the NSButton for the
close button.
>and try to hide the button when not required.
According to this suggestion I included the following lines in my
program
NSButton *closeButton = [mainWindow
standardWindowButton:NSWindowCloseButton];
[closeButton setEnabled:NO];
After adding these the build command is successfully executed.
But while running the executable the Close button from the title bar
doesn't get disabled.
Any idea why is this happening?
--Amrit.
-----Original Message-----
From: Vinay Prabhu [mailto:email@hidden]
Sent: Monday, July 17, 2006 12:30 PM
To: 'John C. Randolph'; Amritendu Majumdar (WT01 - Semiconductors &
Consumer Electronics)
Cc: 'I. Savant'; 'Cocoa Dev'
Subject: RE: Disabling Certain Title bar controls
standardWindowButton, might be helpful for you.
send the constant NSWindowCloseButton and get the NSButton for the close
button.
and try to hide the button when not required.
I have not tried this method, but this might work or I might be 100%
wrong...
-----Original Message-----
From: cocoa-dev-bounces+vinayprabhu=email@hidden
[mailto:cocoa-dev-bounces+vinayprabhu=email@hidden]On
Behalf Of John C. Randolph
Sent: Monday, July 17, 2006 12:08 PM
To: email@hidden
Cc: I. Savant; Cocoa Dev
Subject: Re: Disabling Certain Title bar controls
On Jul 16, 2006, at 9:15 PM, <email@hidden>
<email@hidden> wrote:
>
> Hi I.S,
>
> Yeah, I used the wrong terminology .
> I am talking about the close button on the title bar,need to disable
> it for some time and then enable it back.
> How do I achieve this.
That's not supported. If you want to prevent a window from being
closed, implement -windowShouldClose: in the window's delegate, and do
something like show an alert sheet that tells the user why you're not
going to let the window close.
-jcr
"This is not a book to be tossed aside lightly. Rather, it should be
hurled with great force." -Dorothy Parker
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
.co.
in
This email sent to email@hidden
The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the
addressee(s)and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender or
email@hidden
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden