RE: win32lib v0.59.1 released

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

Derek,

Hey, GREAT job on the v0.59.1.  I applied the new release and everything 
I've ever written worked fine.  The only problem is in the setCheck() 
routine for tree views.  This sample program has a tree view with 
TVS_CHECKBOXES style defined.  Run the program, clicking between the two 
load buttons.  You'll notice that when "Load with setCheck" is clicked 
the check boxes disappear and appear when the other button is pressed.  
I think I found the problem.  When setting the checked state the "state" 
value needs to be:

checked = (2 * power(2, 12))
unchecked = (1 * power(2, 12))

I changed the setting of "state" in setCheck() and the example program 
works fine.

Also, at first glance it looks like you've got the printing issue taken 
care of.  Thank you!

Jonas



--  code generated by Win32Lib IDE v0.17.0

 
include Win32Lib.ew
without warning

--------------------------------------------------------------------------------

--  Window Window1
global constant Window1 = createEx( Window, "Window1", 0, Default, 
Default, 515, 441, {WS_DLGFRAME, WS_SYSMENU}, {WS_EX_DLGMODALFRAME} )
global constant TreeView2 = createEx( TreeView, "", Window1, 32, 20, 
432, 324, 
or_all({TVS_HASLINES,TVS_LINESATROOT,TVS_HASBUTTONS,TVS_SHOWSELALWAYS, 
TVS_CHECKBOXES}), 0 )
constant closefolder = addIcon( extractIcon("clsdfold.ico") )
constant openfolder  = addIcon( extractIcon("openfold.ico") )
global constant LoadCheck = createEx( PushButton, "Load with setCheck", 
Window1, 32, 356, 152, 28, 0, 0 )
global constant LoadNoCheck = createEx( PushButton, "Load without 
setCheck", Window1, 192, 356, 176, 28, 0, 0 )
---------------------------------------------------------
--------------------------------------------------------------------------------

procedure LoadCheck_onClick (integer self, integer event, sequence 
params)--params is ()
	atom void
	eraseItems(TreeView2)
	for i = 1 to 10  do
		void = addTVItem(TreeView2, closefolder, openfolder, sprintf("%d",i), 
0)
		setCheck({{TreeView2, void}}, True)
	end for
end procedure
setHandler( LoadCheck, w32HClick, routine_id("LoadCheck_onClick"))
--------------------------------------------------------------------------------

procedure LoadNoCheck_onClick (integer self, integer event, sequence 
params)--params is ()
	atom void
	eraseItems(TreeView2)
	for i = 1 to 10  do
		void = addTVItem(TreeView2, closefolder, openfolder, sprintf("%d",i), 
0)
	end for
end procedure
setHandler( LoadNoCheck, w32HClick, routine_id("LoadNoCheck_onClick"))


WinMain( Window1,Normal )
Derek Parnell wrote:
> 
> 
> Please find the latest release of the Win32Lib library at
> 
>   http://www.users.bigpond.com/ddparnell/euphoria.htm

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

Search



Quick Links

User menu

Not signed in.

Misc Menu