dimming/disabling specific toolbar components 
Author Message
 dimming/disabling specific toolbar components

I have a form which allows delete only, even so the insert and edit icons
are still enabled on the toolbar. When you selected the insert icon the form
opens with a message saying you may not insert a record.

I wish to simply make the insert and change icons dimmed and disabled for
this
procedure. Is there any way I can achieve this?

Any help more than appreciated.

Regards

--
Michael Minter

http://www.*-*-*.com/ ~michaelm



Thu, 07 Jun 2001 03:00:00 GMT  
 dimming/disabling specific toolbar components
------
Just delete them fron the form
Or do I misunderstand?
Roger Clark

-----

Quote:

>I have a form which allows delete only, even so the insert and edit icons
>are still enabled on the toolbar. When you selected the insert icon the
form
>opens with a message saying you may not insert a record.

>I wish to simply make the insert and change icons dimmed and disabled for
>this
>procedure. Is there any way I can achieve this?

>Any help more than appreciated.

>Regards

>--
>Michael Minter

>http://netspace.net.au/~michaelm



Thu, 07 Jun 2001 03:00:00 GMT  
 dimming/disabling specific toolbar components
Quote:

> I have a form which allows delete only, even so the insert and edit icons
> are still enabled on the toolbar. When you selected the insert icon the form
> opens with a message saying you may not insert a record.

Please mention what template chain and version of cW you are using.
If your using abc, how are you disabling the add/change in the browse? Just
disabling the buttons will not do it. In thisWindow.Init, near the end set
SELF.InsertControl=0 and SELF.ChangeControl=0.  If they are set to 0, when the
browse has focus the buttons should be disabled.

HTH,
---
Jim Kane  - TeamTopSpeed
Productive Software Solutions
Can't Find that Message?
Get Organized, Get ForKeeps!
www.fkeeps.com



Thu, 07 Jun 2001 03:00:00 GMT  
 dimming/disabling specific toolbar components
Since you are using a toolbar, I assume that you are posting to it from
various procedures.  I use a Global Array (BYTE) that is dimensioned the
same as the number of buttons on my toolbar.  From each procedure that uses
the toolbar, I set the appropriate bytes to true or false and then POST an
event to the toolbar, which in turn looks at the value of each of the array
elements and disables the corresponding button.

If Array[1] = True
   Disable(?PrintButton)
Else
   Enable(?PrintButton)
End

If Array[2] = True
   Disable(?SaveButton)
Else
   Enable(?SaveButton)
End

Another way is to record what "control number" is assigned to each button.
Every control on the screen is assigned a numeric control number.  Assuming
that you have set your toolbar screen up such that the first control is the
print button, second control is a save button etc., then you can use the
following type of logic.

Loop x# = 1 to 10
          x#{Prop:Enable} = Array[x#]
End

!!!!  Where x# is the value of the control field.

Hope this helps

Quote:

>I have a form which allows delete only, even so the insert and edit icons
>are still enabled on the toolbar. When you selected the insert icon the
form
>opens with a message saying you may not insert a record.

>I wish to simply make the insert and change icons dimmed and disabled for
>this
>procedure. Is there any way I can achieve this?

>Any help more than appreciated.

>Regards

>--
>Michael Minter

>http://netspace.net.au/~michaelm



Thu, 07 Jun 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. menubars on Windows don't dim disabled items

2. Disabling Toolbar Buttons

3. Enable Disable Toolbar Button

4. Disabling an AppFrame Menu / Toolbar Control

5. Disable ToolBar and Main Frame Menu Items...

6. How to Disable Toolbar Update buttons

7. disable delete on toolbar

8. Temporalily disable global toolbar

9. Disable Items in Toolbar

10. Fujitsu - Disabling specific messages

11. Tktable How do you disable specific table columns

12. OS-specific modules to OS-specific packages

 

 
Powered by phpBB® Forum Software