Page 1 of 1

Toolbar.Horiz="FALSE" seems not to work for Win32

Posted: Mon Apr 24, 2017 9:32 pm
by ntromans
I've just been cross-compiling an application from AROS to Win32. I wished for a vertical toolbar, and setting Horiz="FALSE" in the xml file worked fine for AROS but did not display the toolbar under Windows. The toolbar was rendered fine when left to the default horizontal.

Cheers,
Nigel.

Re: Toolbar.Horiz="FALSE" seems not to work for Win32

Posted: Tue Apr 25, 2017 3:01 pm
by SamuraiCrow
Why are there quotes around false? I thought False was a constant. If you pass a string instead of a constant, wouldn't that evaluate to True?

Re: Toolbar.Horiz="FALSE" seems not to work for Win32

Posted: Tue Apr 25, 2017 5:34 pm
by p-OS
He is not talking about Hollywood Source Code, but the GUI definiton in the XML file... and there its is meant to be a string. Thus sems ok to me.

Re: Toolbar.Horiz="FALSE" seems not to work for Win32

Posted: Tue Apr 25, 2017 10:50 pm
by ntromans
p-OS wrote:He is not talking about Hollywood Source Code, but the GUI definiton in the XML file... and there its is meant to be a string. Thus sems ok to me.
Yes, this is from an XML file. So is the vertical mode working for you on Windows? If so, would you mind posting up your XML line so I can see what's not right with mine?

Thanks,
Nigel.

Re: Toolbar.Horiz="FALSE" seems not to work for Win32

Posted: Wed Apr 26, 2017 12:41 am
by p-OS
didn't user RapaGUI yet, but according to documentation correct Syntax is:

Code: Select all

<toolbar horiz="false">
 .....some buttons....
</toolbar>

Re: Toolbar.Horiz="FALSE" seems not to work for Win32

Posted: Wed Apr 26, 2017 8:34 pm
by airsoftsoftwair
Works here. Please provide a minimal (!) code sample so that I can see what's wrong there...

Re: Toolbar.Horiz="FALSE" seems not to work for Win32

Posted: Thu Apr 27, 2017 6:30 pm
by SamuraiCrow
p-OS wrote:He is not talking about Hollywood Source Code, but the GUI definiton in the XML file... and there its is meant to be a string. Thus sems ok to me.
In that case, is it all lowercase? XML is case sensitive.

Re: Toolbar.Horiz="FALSE" seems not to work for Win32

Posted: Tue May 16, 2017 7:29 pm
by ntromans
airsoftsoftwair wrote:Works here. Please provide a minimal (!) code sample so that I can see what's wrong there...
Sorry for taking a while to get back to you.

The xml code is:

<?xml version="1.0" encoding="iso-8859-1"?>
<application>
<window title="SimpleWhiteboard" notify="closerequest" id="_MAIN" width="60" height="800" StayOnTop="TRUE" left="0" top="0">
<vgroup>
<toolbar id="toolbar" viewmode="Gfx" horiz="FALSE" userdata="draw">
<button id="add_workbench" type = "normal" icon="7" notify="pressed" notifydata="pressed:add_workbench"></button>
<button id="workbench" type="toggle" icon="4" disabled="TRUE" notify="selected" notifydata="selected:toggle_workbench"></button>
<button/>
<button id="add_display" type="normal" icon="5" notify="pressed" notifydata="pressed:add_display"></button>
<button/>
<button id="bin" type="normal" icon="6" notify="pressed" notifydata="pressed:bin" disabled="TRUE"></button>
</toolbar>
</vgroup>
</window>
</application>

Works find on AROS but on Windows 7 & 10 at work it just produces the window top border with a narrow line underneath the border's top bar.

Cheers,
Nigel.

Re: Toolbar.Horiz="FALSE" seems not to work for Win32

Posted: Thu May 18, 2017 10:55 pm
by airsoftsoftwair
Ok, so the toolbar on Win32 doesn't seem to impose a minimum size on the window. Thus, it is there, but you won't see it because there's nothing else in your window. To solve this, just add a rectangle to your code, i.e.:

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?>
<application>
<window title="SimpleWhiteboard" notify="closerequest" id="_MAIN" width="60" height="800" StayOnTop="TRUE" left="0" top="0">
<vgroup>
<toolbar id="toolbar" viewmode="Gfx" horiz="FALSE" userdata="draw">
<button id="add_workbench" type = "normal" icon="7" notify="pressed" notifydata="pressed:add_workbench"></button>
<button id="workbench" type="toggle" icon="4" disabled="TRUE" notify="selected" notifydata="selected:toggle_workbench"></button>
<button/>
<button id="add_display" type="normal" icon="5" notify="pressed" notifydata="pressed:add_display"></button>
<button/>
<button id="bin" type="normal" icon="6" notify="pressed" notifydata="pressed:bin" disabled="TRUE"></button>
</toolbar>
<rectangle/>
</vgroup>
</window>	
</application>
Then it should work.

Re: Toolbar.Horiz="FALSE" seems not to work for Win32

Posted: Tue May 23, 2017 11:12 pm
by ntromans
Many thanks - I'll give that a try at work tomorrow (if I get a couple of minutes).

Cheers,
Nigel.