flattoolbar

new topic     » goto parent     » topic index » view thread      » older message » newer message

You must be able to only have one tool bar. I am confused in the code below
in what it does when i'm trying to set up 2 of them. Do you see anything
wrong here?

without warning
with trace
--trace(1)
include w32lib.ew

integer id,sx,sy,maxX,maxY,fs,sw,sh,cx,cy,acId,icId,saId

sequence tabControl,tabItem,charSize

 sx = getSystemMetrics(SM_CXMAXIMIZED)
 sy = getSystemMetrics(SM_CYMAXIMIZED)
 maxX = getSystemMetrics(SM_CXFULLSCREEN)
 maxY = getSystemMetrics(SM_CYFULLSCREEN)

 if maxX>800 then
  fs = 11 -- font size
 else
  fs = 10
 end if
 setFont(Screen, "Courier New", fs, Normal)
 charSize = getTextExtent(Screen,"abcdefghij")

 sw = maxX - 30 --ceil(charSize[1] * 8.5)
 sh = charSize[2] * 32
 cx = charSize[1]/10
 cy = charSize[2]

 sx = floor((maxX - sw)/2 ) -- 740(sw)
 sy = floor((maxY - sh)/2) -- 510(sh)

constant Main = create(Window,"EUmenu - ACU-TRACK Business Management",
      0,sx,sy,sw,sh,0)

constant toolBar = create(FlatToolBar,"",Main,2,2,sw-15,50,0)
  -- add toolBar items here

constant menuBar = create(FlatToolBar,"",Main,2,60,100,sh -15,0)
  -- loop on EUmenu.e and load menuBar
----------------------------------------------------------------------------
------------------

WinMain(Main,Normal)

george

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu