Menubar within packer frame

vikash jaiswal vik_jai@REDACTED
Thu Jul 6 10:57:54 CEST 2006


   Hello ,
   
             While trying to implement menubar within a packer frame , I'm getting a runtime error . The code is as 
   
  -module(Menubar_with_packer).
   
  -export([start/0]).
   
  start()->
   
    GSStart = gs:start(),
   
    WH = [{width,1000},{height,750}],
  Win = gs:window(GSStart,[{title," Menu_Bar with packer "},
                             {map, true},{configure,true},{width,1000},{height,750}]),
   
    F1 = gs:frame(packer,Win,[{packer_x,[{stretch,1,15},{stretch,1,15},{stretch,1,15}]},{packer_y,[{stretch,1,15},{stretch,1,15},{stretch,1,15}]}]),
  Bar = gs:menubar(F1,[{pack_x,{1,3}},{pack_y,1}),
   
    Menu_Item1 = gs:create(menubutton,Bar, [{label,{text,"ABC"}},{pack_x,1},{pack_y,1}]),
  Menu_item2 = gs:create(menubutton, Bar, [{label, {text,"MNO"}},{pack_x,2},{pack_y,1}]),
   
    gs:config(F1,WH),
    loop(F1).
   
  loop(F1)->
     receive 
            {gs,_,configure,_Data,[Width,Height|,_]} -> gs:config(F1,[{width,Width},{height,Height}]),
                                                                          loop(F1);
           Any ->  loop(F1)
     end.
   
   
   
   
          Could you please tell me whether packing menubar within a packer frame is possible in erlang , or is there some problem with my code ?
   
  Waiting for your reply ,
   
  Regards,
  Vikash

 				
---------------------------------
 Yahoo! India Answers: Share what you know. Learn something new Click here
Catch all the FIFA World Cup 2006 action on Yahoo! India Click here
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060706/193a67e5/attachment.htm>


More information about the erlang-questions mailing list