I'm trying to use the DWToolbar, but I need this to work with
composite windows and a search field. Unfortunately, on composite
windows the search field is hidden.
I have made a very simple example: there is a main canvas containing
the toolbar. On the canvas there are a another canvas and a pop-up
menu. When I start the app, the second canvas is hidden. When I click
on the toolbar canvas the second canvas is shown. After opening up
the pop-up menu the second canvas is hidden again. I can trace this
to the drawing of the background of the toolbar canvas, but a
background is needed. Is this:
a) a restriction of the composite window
b) a bug in Realbasic
c) me being stupid?
Is there any workaround? Using RB 2007R2 and Mac OS 10.4.7. The code
is as follows:
DWToolbar.DrawTo:
Sub DrawTo(g as Graphics)
g.DrawPicture skin,0,0,skin.Width/2,g.Height,0,0,skin.Width/
2,skin.Height
g.DrawPicture skin,skin.Width/2,0,g.Width-
skin.Width,g.Height,skin.Width/2,0,1,skin.Height
g.DrawPicture skin,g.Width-skin.Width/2,0,skin.Width/
2,g.Height,skin.Width/2,0,skin.Width/2,skin.Height
End Sub
DWToolbar.Constructor:
Sub Constructor()
Skin = TBBaseAquaSkin
End Sub
DWToolbar.AddItem:
Sub AddItem(item as DWToolBarItem)
Refresh
End Sub
DWToolbar.MouseDown:
Function MouseDown(X As Integer, Y As Integer) As Boolean
Refresh
End Function
DWToolbar.Paint:
Sub Paint(g As Graphics)
DrawTo g
End Sub
DWToolBarItem.Draw:
Sub Draw(g as Graphics)
Paint g
End Sub
DWToolBarControlContainer.Constructor:
Sub Constructor(c as RectControl)
embeddedControl = c
embeddedControl.Parent = Parent
End Sub
Window1.InitToolbar:
Private Sub InitToolbar()
ToolBar.AddItem New DWToolBarControlContainer(PopupMenu3)
ToolBar.AddItem New DWToolBarControlContainer(Canvas1)
End Sub
Window1.Open:
Sub Open()
InitToolbar
End Sub
Alternatively, I have uploaded it to
http://www.mothsoftware.com/download/toolbar.zip
Mit freundlichen Grüßen/Regards
Trixi Willius
http://www.mothsoftware.com
Mail Archiver X: archive, clean and search email
http://www.beatrixwillius.de
Fractals, 3d landscapes etc.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>