Re: Disable/Desensitize the close button on a widget_base? [message #61629] |
Fri, 25 July 2008 09:08 |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
humanumbrella@gmail.com wrote:
> On Jul 25, 11:22 am, David Fanning <n...@dfanning.com> wrote:
>> humanumbre...@gmail.com writes:
>>> It works alright, but it desensitizes the whole window O_O
>>> I can't move it around or play with it anymore. ):
>> Well, what did you apply it to? Just apply it to the
>> button in question, and only that button should be
>> desensitized.
>>
>> Cheers,
>>
>> David
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming:http://www.dfanning.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
> Hey David,
>
> I meant the system default red close button on the titlebar of the
> widget, not a button I had created in the widget.
> It looks like I found what I needed though.
I think you want the the TLB_FRAME_ATTR keyword to Widget_Base()
cheers,
paulv
|
|
|
|
Re: Disable/Desensitize the close button on a widget_base? [message #61637 is a reply to message #61636] |
Fri, 25 July 2008 08:25  |
humanumbrella
Messages: 52 Registered: June 2008
|
Member |
|
|
On Jul 25, 11:22 am, David Fanning <n...@dfanning.com> wrote:
> humanumbre...@gmail.com writes:
>> It works alright, but it desensitizes the whole window O_O
>> I can't move it around or play with it anymore. ):
>
> Well, what did you apply it to? Just apply it to the
> button in question, and only that button should be
> desensitized.
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Hey David,
I meant the system default red close button on the titlebar of the
widget, not a button I had created in the widget.
It looks like I found what I needed though.
Thanks!
Cheers,
--Justin
|
|
|
|
Re: Disable/Desensitize the close button on a widget_base? [message #61639 is a reply to message #61638] |
Fri, 25 July 2008 08:22  |
humanumbrella
Messages: 52 Registered: June 2008
|
Member |
|
|
On Jul 25, 11:18 am, humanumbre...@gmail.com wrote:
> On Jul 25, 11:13 am, Vince Hradil <hrad...@yahoo.com> wrote:
>
>> On Jul 25, 10:04 am, humanumbre...@gmail.com wrote:
>
>>> Is this possible in IDL? Anyone ever tried? (:
>
>>> I poked around in the manual but came up empty handed.
>
>>> Basically I have one widget that spawns another one, and I would like
>>> the spawned one not to be able to be closed, because when you close
>>> the main widget it closes the spawned one.
>
>>> Thanks!
>>> --Justin
>
>> Does SENSITIVE=0 work?
>
> It works alright, but it desensitizes the whole window O_O
> I can't move it around or play with it anymore. ):
>
> hmm..
>
> Cheers!
> Justin
I found it~
I was looking at the xmtool because I had it running and I noticed
that it didn't have minimize/maximize buttons.
So I found its code in the lib/utilities.
There's a parameter: TLB_FRAME_ATTR you can set on your base.
Here's from the help:
TLB_FRAME_ATTR
Set this keyword to one of the values shown in the table below to
suppress certain aspects of a top-level base's window frame. This
keyword applies only to top-level bases. The settings are merely hints
to the window system and may be ignored by some window managers. Valid
settings are:
1 Base cannot be resized, minimized, or maximized.
2 Suppress display of system menu.
4 Suppress title bar.
8 Base cannot be closed.
16 Base cannot be moved.
This keyword is set bitwise, so multiple effects can be set by adding
values together. For example, to make a base that has no title bar
(value 4) and cannot be moved (value 16), set the TLB_FRAME_ATTR
keyword to 20 (that is, 4+16).
Weee
Cheers!
--Justin
|
|
|
Re: Disable/Desensitize the close button on a widget_base? [message #61640 is a reply to message #61639] |
Fri, 25 July 2008 08:18  |
humanumbrella
Messages: 52 Registered: June 2008
|
Member |
|
|
On Jul 25, 11:13 am, Vince Hradil <hrad...@yahoo.com> wrote:
> On Jul 25, 10:04 am, humanumbre...@gmail.com wrote:
>
>> Is this possible in IDL? Anyone ever tried? (:
>
>> I poked around in the manual but came up empty handed.
>
>> Basically I have one widget that spawns another one, and I would like
>> the spawned one not to be able to be closed, because when you close
>> the main widget it closes the spawned one.
>
>> Thanks!
>> --Justin
>
> Does SENSITIVE=0 work?
It works alright, but it desensitizes the whole window O_O
I can't move it around or play with it anymore. ):
hmm..
Cheers!
Justin
|
|
|
Re: Disable/Desensitize the close button on a widget_base? [message #61641 is a reply to message #61640] |
Fri, 25 July 2008 08:13  |
Vince Hradil
Messages: 574 Registered: December 1999
|
Senior Member |
|
|
On Jul 25, 10:04 am, humanumbre...@gmail.com wrote:
> Is this possible in IDL? Anyone ever tried? (:
>
> I poked around in the manual but came up empty handed.
>
> Basically I have one widget that spawns another one, and I would like
> the spawned one not to be able to be closed, because when you close
> the main widget it closes the spawned one.
>
> Thanks!
> --Justin
Does SENSITIVE=0 work?
|
|
|