comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Disable/Desensitize the close button on a widget_base?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Disable/Desensitize the close button on a widget_base? [message #61629] Fri, 25 July 2008 09:08
Paul Van Delst[1] is currently offline  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 #61636 is a reply to message #61629] Fri, 25 July 2008 08:37 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
humanumbrella@gmail.com writes:

> 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.

A "red close button" must mean a Macintosh. Does this
mean that all the TLB_FRAME_ATTR values work on the
Mac?

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.")
Re: Disable/Desensitize the close button on a widget_base? [message #61637 is a reply to message #61636] Fri, 25 July 2008 08:25 Go to previous message
humanumbrella is currently offline  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 #61638 is a reply to message #61637] Fri, 25 July 2008 08:22 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
humanumbrella@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.")
Re: Disable/Desensitize the close button on a widget_base? [message #61639 is a reply to message #61638] Fri, 25 July 2008 08:22 Go to previous message
humanumbrella is currently offline  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 Go to previous message
humanumbrella is currently offline  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 Go to previous message
Vince Hradil is currently offline  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?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Disable/Desensitize the close button on a widget_base?
Next Topic: Re: IDL Version Number Warning

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:39:30 PDT 2025

Total time taken to generate the page: 0.00450 seconds