Re: TreeView as a child of TabControl

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

------=_NextPart_000_002C_01C02EAF.D91943C0
        charset="iso-8859-1"

Hi Ad,
I have the same effect when testing your code on NT4 SP6. Here is a
workaround for it ...

Insert...

  procedure TVfocus()
      repaintWindow(TV)
  end procedure
  onGotFocus[TV] = routine_id("TVfocus")

before WinMain() call. This fixes for now. I'll look into Win32Lib for a
permanant fix.

-----
cheers,
Derek Parnell


-----Original Message-----

  I've got a little demo here of a TreeView as a child of a TabItem (in
Win32Lib v0.53).
  I understand that TabItems cannot really have children; the TabControl is
the 'real parent'. Maybe that is the cause of what you see here? I only get
to see the first TV-Item, and the rest of the TV-window stays gray.
  But, as I got away from the computer for a while, and the screensaver was
activated, the TreeView came up correctly when deactivating the screensaver
again. The same thing happens when I change TabItems and come back to the
one with the TreeView in it.
  Maybe some form of repainting should be added to the construction of
TreeViews?

  Thanks, Ad

  -- CustCont in Euphoria

  include Win32Lib.ew
  without warning

  constant
  Win = create(Window, "CustCont", 0, 40, 60, 720, 480, 0),
  Tabs = create(TabControl, "", Win, 5, 5, 300, 440, 0),
  Tab1 = create(TabItem, "op &Naam", Tabs, 0, 0, 0, 0, 0),
  Tab2 = create(TabItem, "op n&Ummer", Tabs, 0, 0, 0, 0, 0),
  Tab3 = create(TabItem, "op &Datum", Tabs, 0, 0, 0, 0, 0),
  TV = create(TreeView, "", Tab1, 10, 30, 280, 400, or_all({TVS_HASLINES,
      TVS_LINESATROOT, TVS_HASBUTTONS, TVS_SHOWSELALWAYS}))

  setIcon(Win, "1083.ico")

  constant
  closefolder = addIcon(extractIcon("clsdfold.ico")),
  openfolder  = addIcon(extractIcon("openfold.ico"))

  sequence folders
  folders = {}

  folders &= addTVItem(TV, closefolder, openfolder, "Test 1", 0)
  folders &= addTVItem(TV, closefolder, openfolder, "Test 2", 0)
  folders &= addTVItem(TV, closefolder, openfolder, "Test 3", folders[1])

  WinMain(Win, Normal)

------=_NextPart_000_002C_01C02EAF.D91943C0
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3105.105" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D697423322-04102000>Hi=20
Ad,</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D697423322-04102000>I have=20
the same effect when testing your code on NT4 SP6. Here is a workaround =
for it=20
...</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px">
  <DIV><FONT color=3D#0000ff face=3D"Courier New" size=3D2><STRONG><SPAN =

  class=3D697423322-04102000><FONT color=3D#008000>procedure=20
  TVfocus()<BR>&nbsp;&nbsp;&nbsp; repaintWindow(TV)<BR>end=20
  procedure<BR>onGotFocus[TV] =3D=20
>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D697423322-04102000>before=20
WinMain() call. This fixes for now. I'll look into Win32Lib for a =
permanant=20
fix.</DIV></SPAN></FONT>
<DIV>&nbsp;</DIV>
<P><FONT size=3D2>-----<BR>cheers,<BR>Derek Parnell</FONT></P>
<P><FONT size=3D2><BR></FONT><FONT face=3D"Times New Roman" =
size=3D2>-----Original=20
Message-----</FONT></P>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px">
  <DIV>I've got a little demo here of a TreeView as a child of a TabItem =
(in=20
  Win32Lib v0.53).</DIV>
  <DIV>I understand that TabItems cannot really have children; the =
TabControl is=20
  the 'real parent'. Maybe that is the cause of what you see here? I =
only get to=20
  see the first TV-Item, and the rest of the TV-window stays gray.</DIV>
  <DIV>But, as I got away from the computer for a while, and the =
screensaver was=20
  activated, the TreeView came up correctly when deactivating the =
screensaver=20
  again. The same thing happens when I change TabItems and come back to =
the one=20
  with the TreeView in it.</DIV>
  <DIV>Maybe some form of repainting should be added to the construction =
of=20
  TreeViews?</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Thanks, Ad</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>-- CustCont in Euphoria</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>include Win32Lib.ew<BR>without warning</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>constant<BR>Win =3D create(Window, "CustCont", 0, 40, 60, 720, =
480,=20
  0),<BR>Tabs =3D create(TabControl, "", Win, 5, 5, 300, 440, =
0),<BR>Tab1 =3D=20
  create(TabItem, "op &amp;Naam", Tabs, 0, 0, 0, 0, 0),<BR>Tab2 =3D=20
  create(TabItem, "op n&amp;Ummer", Tabs, 0, 0, 0, 0, 0),<BR>Tab3 =3D=20
  create(TabItem, "op &amp;Datum", Tabs, 0, 0, 0, 0, 0),<BR>TV =3D=20
  create(TreeView, "", Tab1, 10, 30, 280, 400,=20
  or_all({TVS_HASLINES,<BR>&nbsp;&nbsp;&nbsp;&nbsp;TVS_LINESATROOT,=20
  TVS_HASBUTTONS, TVS_SHOWSELALWAYS}))</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>setIcon(Win, "1083.ico")</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>constant <BR>closefolder =3D=20
  addIcon(extractIcon("clsdfold.ico")),<BR>openfolder&nbsp; =3D=20
  addIcon(extractIcon("openfold.ico"))</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>sequence folders<BR>folders =3D {}</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>folders &amp;=3D addTVItem(TV, closefolder, openfolder, "Test 1", =

  0)<BR>folders &amp;=3D addTVItem(TV, closefolder, openfolder, "Test =
2",=20
  0)<BR>folders &amp;=3D addTVItem(TV, closefolder, openfolder, "Test =
3",=20
  folders[1])</DIV>
  <DIV>&nbsp;</DIV>

------=_NextPart_000_002C_01C02EAF.D91943C0--

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

Search



Quick Links

User menu

Not signed in.

Misc Menu