Page 1 of 1

Changing the oriantation of a toolbar

Posted: Tue Aug 14, 2007 11:02 am
by walker
Why is ist impossible to create a vertical toolbar? it seems that the toolbar PB create has some fixed parameters that cant' be changed by a gtk_xxx command?

Code: Select all

gtk_toolbar_set_orientation_(*toolbar1,#GTK_ORIENTATION_VERTICAL)
should work.... but the result is a little weired... if adding

Code: Select all

gtk_toolbar_set_show_arrow_(*toolbar1,#False)
the entrys are shown.... but over all not as desired :roll:

the lib used to create a toolbar is located here: http://www.purebasic.fr/english/viewtopic.php?t=25882
The source for creating the Toolbar (part of the library):

Code: Select all

ProcedureCDLL CreateTB(tbar.l, *Hwnd.l, type.l, orientation.l); Creates a toolbar - Type can be #GTK_TOOLBAR_TEXT/#GTK_TOOLBAR_BOTH/#GTK_TOOLBAR_ICONS
; type: #GTK_TOOLBAR_TEXT to show text only and  #GTK_TOOLBAR_BOTH for both, text and Icon 
;         #GTK_TOOLBAR_ICONS for icons only
 TBSTYLE.l=type
*tooltips = gtk_tooltips_new_()
   *toolbar1=CreateToolBar(tbar,*Hwnd)
    gtk_widget_show_(*toolbar1);
    gtk_toolbar_set_style_(*toolbar1, TBSTYLE);
If orientation=1
    gtk_toolbar_set_orientation_(*toolbar1,#GTK_ORIENTATION_VERTICAL)
 EndIf  

If *toolbar1
    ProcedureReturn *toolbar1
Else
    ProcedureReturn 0
EndIf    
EndProcedure
[Edit]
if I use

Code: Select all

gtk_widget_set_size_request_(*toolbar1,100,400)
only the height parameter is used... the width is ignored.... :(

[/Edit]

Posted: Tue Aug 14, 2007 4:26 pm
by Fred
This kind of manipulations of PB objects can't be considered as bugs, as you never know how it is implemented (or if it will be future proof).

Posted: Tue Aug 14, 2007 9:58 pm
by walker
well... thats why I'd asked it as question.... (ok the wrong section... my apologies for this) So i guess it's not possible because of your implementation...hm... is there a chance to get it changed (the implementation) to get it working? (it's not a must have... but would be nice... and could this thread be moved to feature requests?)