Disabling a button [message #393972] |
Wed, 25 March 2009 04:30 |
irfankundi786@yahoo.com
Messages: 269 Registered: February 2009 Location: pakistan
|
Senior Member |
|
|
Can anyone tell me that a button can disabled itself if not then tell me the reason.
I think a button can disable another button using set_item_property but it can not itself.
I want to know about the reason.
Thanks
[MERGED by LF]
[Updated on: Thu, 26 March 2009 10:33] by Moderator Report message to a moderator
|
|
|
Re: Button Disabled using set_item_property() [message #393978 is a reply to message #393972] |
Wed, 25 March 2009 04:42 |
rzkhan
Messages: 370 Registered: March 2005
|
Senior Member |
|
|
of course , it can disable itself.
like
there are three buttons (pg1,pg2,pg3) on block cbk.
the code attached to pg1 disables the pg1 and enables pg2 and pg3.
trigger name: when-button-pressed
set_item_property('cbk.pg1',enabled,property_false);
set_item_property('cbk.pg2',enabled,property_true);
set_item_property('cbk.pg3',enabled,property_true);
hope u understand it.
Riaz
[Updated on: Wed, 25 March 2009 04:45] Report message to a moderator
|
|
|
Disable the button itself [message #393991 is a reply to message #393972] |
Wed, 25 March 2009 05:13 |
irfankundi786@yahoo.com
Messages: 269 Registered: February 2009 Location: pakistan
|
Senior Member |
|
|
thank for repling to me.
but the code you have sent in not working.
set_item_property('cbk.pg1',enabled,property_false);
set_item_property('cbk.pg2',enabled,property_false);
set_item_property('cbk.pg3',enabled,property_true);
exception is
frm-41032 cannot set enable attribute of current item
help me why .
I check it in oracle form 6i.
|
|
|
Re: Disable the button itself [message #394005 is a reply to message #393991] |
Wed, 25 March 2009 05:45 |
cookiemonster
Messages: 13960 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Next time you reply to someone do you want to use the reply button (bottom right of screen) rather than start a new thread?
It's easier to follow if you do.
You can't ever disable the current item.
The current item is where the cursor is.
The cursor can't be in a disabled item (that's one of the main points of disabling items after all).
So you need to move the cursor somewhere else (with go_item) before you can disable the item.
|
|
|