Just as with the toolbox in the previous chapter, the first thing that we will need to do in order to create a toolbar is to design a suitable window template. This time, we will create a toolbar containing a couple of action buttons and a writable icon, which will span the top of our main window – a bit like the URL bar in a browser. The template has been called “Toolbar”, and can be seen in
Just as with the toolbox in the previous chapter, the first thing that we will need to do in order to create a toolbar is to design a suitable window template. This time, we will create a toolbar containing a couple of action buttons and a writeable icon, which will span the top of our main window – a bit like the URL bar in a browser. The template has been called “Toolbar”, and can be seen in
The height of the work area (
The height of the work area (
We have also adjusted the minimum sizes of the bar, although this is as much to keep WinEd happy: with the minimum
The window contains two action buttons and a writable icon, so that we can easily see how the work area moves around in relation to its parent window. All three icons are 52 OS Units high, to match the standard height for a writable icon, and there is a 4 OS Unit gap around the edges of the work area on all four sides.
+The window contains two action buttons and a writeable icon, so that we can easily see how the work area moves around in relation to its parent window. All three icons are 52 OS Units high, to match the standard height for a writeable icon, and there is a 4 OS Unit gap around the edges of the work area on all four sides.
Once again, we can add the lines shown in
Running the upplication application should reveal a new toolbar attached to the top of the main window, as shown in
Running the upplication application should reveal a new toolbar attached to the top of the main window, as shown in
There’s one final niggle to look at before we move on, which can be seen when the width of the main window is reduced. The writeable icon in the bar appears to be truncated, with the right-hand end disappearing off out of view as seen in
However, if we’re happy to support machines from the RiscPC onwards – which isn’t an unreasonable idea – then we can adjust the size of the writeable icon as we re-open the panes.
+ +