Re: xControls Issue with Tabs

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

cklester wrote:
> 
> I want it to shrink/expand with changes to the parent
> tab's size. And it <i>almost</i> does this, except the top
> coordinate is wrong. Instead of using a point inside the tab item/control,
> it uses a point in front of the tab itself. Now, I can manage this myself
> by using {0,25} for the "top" coordinate, but I shouldn't have to make
> that kind of adjustment. If I use {.5,-5} for the "top" coordinate, it
> will be WRONG because the "top" isn't '1,' but it's really '25' (or so).
> See what I mean? Hope that's clear. :)
> 

CK,

The following works, if you're interested.  I have a feeling that it
won't work if you have more than one control on the window (besides
the tab control)

include Win32Lib.ew
include xcontrols.ew

constant
	-- windows and controls
	Window1 = createEx( Window, "Window1", 0, Default, Default, 400, 300, 0, 0 ),
TabControl2 = createEx( TabControl, "TabControl2", Window1, 24, 8, 300, 232, 0,
0 ),
	TabItem3 = createEx( TabItem, "TabItem3", TabControl2, 0, 0, 0, 0, 0, 0 ),
	TabItem4 = createEx( TabItem, "TabItem4", TabControl2, 0, 0, 0, 0, 0, 0 ),
	List7 = createEx( List, "List7", TabItem4, 40, 44, 148, 120, 0, 0 ),
	TabItem5 = createEx( TabItem, "TabItem5", TabControl2, 0, 0, 0, 0, 0, 0 ),
	TabItem6 = createEx( TabItem, "TabItem6", TabControl2, 0, 0, 0, 0, 0, 0 ),

	-- xcontrols	
	gmid = xControl( Geometry, "", Window1, 0, 0, 0, 0, 0, 0 )

	manage(gmid,TabControl2,{0,25},{0,25},{1,-25},{1,-25})
	manage(gmid,List7,{0,5},{0,25},{1,-60},{1,-60})

	setFocus(TabItem4)

WinMain( Window1,Normal )


Jonas Temple
http://www.yhti.net/~jktemple

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

Search



Quick Links

User menu

Not signed in.

Misc Menu