Notification Messages

The tree view control sends notification messages to notify about events. For more information on notification messages, refer to ConnectListNotify.

The following example shows how to connect the tree view notification messages with the corresponding message:

::method Init
  use arg InitStem.
  if Arg(1,"o") = 1 then
     InitRet = self~Init:super
  else
     InitRet = self~Init:super(InitStem.)

  if self~Load("tree.rc", ) \= 0 then do
     self~InitCode = 1
    return
  end

  /* Connect dialog control items to class methods */
  self~ConnectTreeNotify("IDC_TREE","SelChanging","OnSelChanging_IDC_TREE")
  self~ConnectTreeNotify("IDC_TREE","SelChanged","OnSelChanged_IDC_TREE")
  self~ConnectTreeNotify("IDC_TREE","Expanding","OnExpanding_IDC_TREE")
  self~ConnectTreeNotify("IDC_TREE","Expanded","OnExpanded_IDC_TREE")
  self~ConnectTreeNotify("IDC_TREE","DefaultEdit")
  self~ConnectTreeNotify("IDC_TREE","Delete","OnDelete_IDC_TREE")
  self~ConnectTreeNotify("IDC_TREE","KeyDown","OnKeyDown_IDC_TREE")
  self~ConnectButton("IDC_PB_NEW","IDC_PB_NEW")
  self~ConnectButton("IDC_PB_DELETE","IDC_PB_DELETE")
  self~ConnectButton(2,"Cancel")
  self~ConnectButton(9,"Help")
  self~ConnectButton(1,"OK")
  return InitRet