Re: ListViews in Win32Lib

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

This is a multi-part message in MIME format.

------=_NextPart_000_0008_01C270F8.562DD600
	charset="iso-8859-1"

Hi,

You can use my funciton ListView_SetCheckState ():

--/*
-- shift_left [Created on 30. December 2001, 07:16]
-- The 'shift_left' function does same thing as C's <<.
--
-- PARAMETERS
-- 'x'
--    .
-- 'count'
--    ?.
--
-- RETURN VALUES
-- ?.
--
-- ALGORITHM
-- (WORD (a)) | ((DWORD) ((WORD) (b))) << 16
--*/
global function shift_left (atom x, integer count)
  return x * power (2, count) =20
end function

--/*
-- ListView_SetItemState [Created on 22. July 2002, 05:33]
-- The 'ListView_SetItemState' procedure sets various attributes
-- to listview item.
--
-- PARAMETERS
-- 'listview'
--    .
-- 'item_row'
--    .
-- 'data'
--    .
-- 'mask'
--    .
--*/
global procedure ListView_SetItemState (integer listview, integer =
item_row,=20
    atom data, atom mask)
    atom LV_ITEM
    LV_ITEM =3D struct_LVITEM(0, 0,
        0, data, mask,=20
        0, 0, 0)
    Void =3D sendMessage (listview, LVM_SETITEMSTATE, item_row - 1, =
LV_ITEM)
    release_mem(LV_ITEM)
end procedure

--/*
-- ListView_SetCheckState [Created on 22. July 2002, 05:30]
-- The 'ListView_SetCheckState' procedure checks or unchecks
-- checkbox which is besides listview item.
--
-- PARAMETERS
-- 'listview'
--    win32lib id of listview window.
-- 'item_row'
--    row at which is item in listview currently
-- 'state'
--    true or false.
--*/
global procedure ListView_SetCheckState (integer listview, integer =
item_row, integer state)
    ListView_SetItemState (listview, item_row, shift_left (state + 1, =
12), LVIS_STATEIMAGEMASK)
end procedure
  ----- Original Message -----=20
  From: robsz1 at netzero.net=20
  To: EUforum=20
  Sent: Friday, October 11, 2002 5:07 AM
  Subject: ListViews in Win32Lib



  Hello list.

  I am using Win32Lib v 0.57.9 and have a question.

  I have a ListView(Report style) with checkboxes.

  Does anyone know how i can tell it to check item # x ?

  thanks in advance,
      Robert Szalay




------=_NextPart_000_0008_01C270F8.562DD600
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>You can use my funciton =
ListView_SetCheckState=20
():</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>--/*<BR>-- shift_left [Created on 30. =
December=20
2001, 07:16]<BR>-- The 'shift_left' function does same thing as C's=20
&lt;&lt;.<BR>--<BR>-- PARAMETERS<BR>-- 'x'<BR>--&nbsp;&nbsp;&nbsp; =
.<BR>--=20
'count'<BR>--&nbsp;&nbsp;&nbsp; ?.<BR>--<BR>-- RETURN VALUES<BR>--=20
?.<BR>--<BR>-- ALGORITHM<BR>-- (WORD (a)) | ((DWORD) ((WORD) (b))) =
&lt;&lt;=20
16<BR>--*/<BR>global function shift_left (atom x, integer =
count)<BR>&nbsp;=20
return x * power (2, count)&nbsp; <BR>end function</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>--/*<BR>-- ListView_SetItemState =
[Created on 22.=20
July 2002, 05:33]<BR>-- The 'ListView_SetItemState' procedure sets =
various=20
attributes<BR>-- to listview item.<BR>--<BR>-- PARAMETERS<BR>--=20
'listview'<BR>--&nbsp;&nbsp;&nbsp; .<BR>-- =
'item_row'<BR>--&nbsp;&nbsp;&nbsp;=20
.<BR>-- 'data'<BR>--&nbsp;&nbsp;&nbsp; .<BR>-- =
'mask'<BR>--&nbsp;&nbsp;&nbsp;=20
.<BR>--*/<BR>global procedure ListView_SetItemState (integer listview, =
integer=20
item_row, <BR>&nbsp;&nbsp;&nbsp; atom data, atom =
mask)<BR>&nbsp;&nbsp;&nbsp;=20
atom LV_ITEM<BR>&nbsp;&nbsp;&nbsp; LV_ITEM =3D struct_LVITEM(0,=20
0,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0, data, mask,=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0, 0, =
0)<BR>&nbsp;&nbsp;&nbsp;=20
Void =3D sendMessage (listview, LVM_SETITEMSTATE, item_row - 1,=20
LV_ITEM)<BR>&nbsp;&nbsp;&nbsp; release_mem(LV_ITEM)<BR>end=20
procedure</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>--/*<BR>-- ListView_SetCheckState =
[Created on 22.=20
July 2002, 05:30]<BR>-- The 'ListView_SetCheckState' procedure checks or =

unchecks<BR>-- checkbox which is besides listview item.<BR>--<BR>--=20
PARAMETERS<BR>-- 'listview'<BR>--&nbsp;&nbsp;&nbsp; win32lib id of =
listview=20
window.<BR>-- 'item_row'<BR>--&nbsp;&nbsp;&nbsp; row at which is item in =

listview currently<BR>-- 'state'<BR>--&nbsp;&nbsp;&nbsp; true or=20
false.<BR>--*/<BR>global procedure ListView_SetCheckState (integer =
listview,=20
integer item_row, integer state)<BR>&nbsp;&nbsp;&nbsp; =
ListView_SetItemState=20
(listview, item_row, shift_left (state + 1, 12), =
LVIS_STATEIMAGEMASK)<BR>end=20
procedure</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A title=3Drobsz1 at netzero.net=20
  href=3D"mailto:robsz1 at netzero.net">robsz1 at netzero.net</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=3DEUforum at topica.com=20
  href=3D"mailto:EUforum at topica.com">EUforum</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Friday, October 11, 2002 =
5:07=20
  AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> ListViews in =
Win32Lib</DIV>
  <DIV><BR></DIV><PRE>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The Euphoria =
Mailing List =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
</PRE>
  <DIV><FONT face=3DArial size=3D2>Hello list.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>I am using Win32Lib v 0.57.9 and have =
a=20
  question.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>I have a ListView(Report style) with=20
  checkboxes.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Does anyone know how i can tell it to =
check item=20
  # x ?</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>thanks in advance,</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; Robert =
Szalay</FONT></DIV><PRE>=3D=3D^=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This email was sent to: tone.skoda at gmx.net

EASY UNSUBSCRIBE click here: <A =
href=3D"http://topica.com/u/?b1dd66.b3fcy3">http://topica.com/u/?b1dd66.b=
3fcy3</A>
Or send an email to: EUforum-unsubscribe at topica.com

T O P I C A -- Register now to manage your mail!
<A =
href=3D"http://www.topica.com/partner/tag02/register">http://www.topica.c=
om/partner/tag02/register</A>
=3D=3D^=3D=3D^=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

------=_NextPart_000_0008_01C270F8.562DD600--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu