[gtkada] possible bug and gnome bindings -- newbie questions
Srinivasan, Rajagopalan (IndSys, SalemVA)
Rajagopalan.Srinivasan at indsys.ge.com
Sat Oct 14 15:56:43 CEST 2000
folks
a) I am trying to develop an "editor" plugged into another main window. I
would like the editor window to have a vertical and a horizontal scrollbar.
The techniques I have tried so far are :
- a 2 X 2 table with the Vertical scrollbar in the cell 0,1 and the
horizontal scrollbar in the cell 1,0. This was a technique suggested by Eric
Harlow in his book.
- Tried to create a Scrolled_Window with the "text" plugged inside of
it.
For some unknown reason, the horizontal scrollbar does not appear to
work. The vertical scrollbar is working correctly.
I have reproduced the relevant section of code here :
--------------------------
function Create( Box : Gtk.Box.Gtk_Box) return Gtk_Editor
is
use Gtk.Enums ;
Ed : Gtk_Editor := new Gtk_Editor_Record ;
Txt : Gtk.Text.Gtk_Text ;
Scrtxt : Gtk.Scrolled_Window.Gtk_Scrolled_Window ;
Rightpane : Gtk.Box.Gtk_Vbox ;
Fndbar : Gtk.Box.gtk_Hbox ;
Chcase : Gtk.Check_Button.Gtk_Check_Button ;
Fndtxt : Gtk.Combo.Gtk_Combo ;
Fndbtn : Gtk.Button.Gtk_Button ;
Chback : Gtk.Check_Button.Gtk_Check_Button ;
begin
Gtk.Box.Gtk_New_Vbox( Rightpane ) ;
Gtk.Box.Gtk_New_Hbox( Fndbar ) ;
Gtk.Check_Button.Gtk_New( Chcase , "Case Sensitive" ) ;
Gtk.Box.Pack_Start( Fndbar , Chcase , False , True , 5 ) ;
Gtk.Combo.Gtk_New( Fndtxt ) ;
Gtk.Box.Pack_Start( Fndbar , Fndtxt , False , True , 5 ) ;
Gtk.Button.Gtk_New( Fndbtn , "Find Next" ) ;
Gtk.Box.Pack_Start( Fndbar , Fndbtn , False , True , 5 ) ;
Gtk.Check_Button.Gtk_New( Chback , "Search Backwards" ) ;
Gtk.Box.Pack_End( Fndbar , Chback , False , True , 5 ) ;
Gtk.Text.Gtk_New( Txt ) ;
Gtk.Scrolled_Window.Gtk_New( Scrtxt ) ;
Gtk.Scrolled_Window.Set_Policy( Scrtxt , Gtk.Enums.Policy_Always ,
Gtk.Enums.Policy_Automatic ) ;
Gtk.Scrolled_Window.Add( Scrtxt , Txt ) ;
Gtk.Text.Set_Line_Wrap( Txt , False ) ;
Gtk.Text.Show( Txt ) ;
Ed.Txt := Txt ;
Gtk.Box.Pack_Start( Rightpane , Fndbar , False , True , 5 ) ;
Gtk.Box.Pack_End( Rightpane , Scrtxt ) ;
Gtk.Box.Pack_End( Box , Rightpane ) ;
return ed ;
end Create;
-------------------------
Can someone see what is wrong?. Is there a better way to develop an
editor window?
b) I have recently learnt that "gnome" has a bunch of higher level widgets.
Is anyone working on :
- porting them to Gtk on Win32?
- creating a binding for them in Ada?
c) Is there a "Splitter" widget under Gtk++ similar to the CSplitterWnd in
MFC?
Any info would be appreciated.
regards
srini
R. Srinivasan
General Electric Industrial Systems
Engineering Services
1501 Roanoke Boulevard
Salem, VA 24153
mailto:Rajagopalan.Srinivasan at IndSys.ge.com
Phone : (540) 387-7870 Dial-Comm : 278-7870
More information about the gtkada
mailing list