G'Day Dennis, On Wed, 18 Apr 2007, at 2:55, Dennis Birch wrote:
> While working with the built-in RB toolbar, I noticed another problem > that makes it difficult to use for my intended purposes. I want to be > able to programmatically set the toggle (pushed) value of a toolbutton > depending on conditions. But there is no apparent way of doing so. I > found a bug report addressing this issue in the bugbase. If you would > like to see RS address this shortcoming, please sign on to this report > by clicking "Add" in the "Requests" line of the "Report Information" > box at the top of the report. > > <http://support.realsoftware.com/feedback/viewreport.php? > reportid=yfjebqae&cmd=watch> Put this in your Toolbar's Action event: //Toggle Handling - set all other Toggle Buttons to off Dim T1, T2 as ToolButton Dim i as Integer T1=ToolButton(Item) If T1.Style = T1.ToolStyleToggleButton then For i = 0 to Me.Count If Me.Item(I) IsA ToolButton and Me.Item(i) <> Item then T2 = ToolButton(Me.Item(i)) If T2.Style = T2.ToolStyleToggleButton then T2.Pushed = Not T1.Pushed End If Next End If The only thing this does not do is stop you from deselecting the currently toggled on item. cya Ben _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
