TreeView Component

All,
Looking into building an e-learning menu with a Flash Tree
component. We'd
like to vary the icons in the tree and perhaps change the
text color based
on the learner's progress in the course. We're using an XML
file for
building the menu tree nodes/leaves....Has anyone seen a good
tutorial on
building the XML file to customize the tree icons and text
properties?
TIA,
Marc Lee
Denver

All,
Looking into building an e-learning menu with a Flash Tree
component. We'd
like to vary the icons in the tree and perhaps change the
text color based
on the learner's progress in the course. We're using an XML
file for
building the menu tree nodes/leaves....Has anyone seen a good
tutorial on
building the XML file to customize the tree icons and text
properties?
TIA,
Marc Lee
Denver

Similar Messages

  • Treeview Component Customisation

    Hi all,
    The treeview component has a "depthColors" capability for
    varying the background colour of the tree cells according to depth.
    However, I would like to implement something similar for varying
    selection colours according to the tree branch.
    e.g. the nodes would be like:
    <node label="Node 1" col='0x000000'>
    <node label="Child Node 1" col='0x000000'>
    </node>
    <node label="Child Node 2" col='0x000000'>
    </node>
    </node>
    <node label="Node 2" col='0x00FF00'>
    <node label="Child Node 1" col='0x00FF00'>
    </node>
    <node label="Child Node 2" col='0x00FF00'>
    </node>
    </node>
    <node label="Node 3" col='0x0000FF''>
    <node label="Child Node 1" col='0x0000FF'>
    </node>
    <node label="Child Node 2" col='0x0000FF'>
    </node>
    </node>
    and I want each of these rows and their children to have a
    different selection colour (I want all children to have same
    selection colour as their parent).
    I have tried modifying SelectableRow.as but have run into
    problems because each cell does not have a static hierarchical id.
    Does anyone have any suggestions - other than building my own
    treeview component from scratch (I wanted to use the built-in
    component to save development time)?
    ade.

    Hi all,
    The treeview component has a "depthColors" capability for
    varying the background colour of the tree cells according to depth.
    However, I would like to implement something similar for varying
    selection colours according to the tree branch.
    e.g. the nodes would be like:
    <node label="Node 1" col='0x000000'>
    <node label="Child Node 1" col='0x000000'>
    </node>
    <node label="Child Node 2" col='0x000000'>
    </node>
    </node>
    <node label="Node 2" col='0x00FF00'>
    <node label="Child Node 1" col='0x00FF00'>
    </node>
    <node label="Child Node 2" col='0x00FF00'>
    </node>
    </node>
    <node label="Node 3" col='0x0000FF''>
    <node label="Child Node 1" col='0x0000FF'>
    </node>
    <node label="Child Node 2" col='0x0000FF'>
    </node>
    </node>
    and I want each of these rows and their children to have a
    different selection colour (I want all children to have same
    selection colour as their parent).
    I have tried modifying SelectableRow.as but have run into
    problems because each cell does not have a static hierarchical id.
    Does anyone have any suggestions - other than building my own
    treeview component from scratch (I wanted to use the built-in
    component to save development time)?
    ade.

  • Customizing TreeView component

    Hi,
    Is it possible to customize the TreeView htmlb Component
    with components like checkbox? ... To clearly state my requirement, I would like to add a checkbox at each node of the tree so that I will handle some logic when the checkbox corresponding to the node is selected.
    I mean that every node and element should have a corresponding checkbox and when I check a node or element
    I should be able to determine whether the value of checkbox(Checked or unchecked) and based on that I will handle some business logic.
    Is this customization possible in HTMLB TreeView?
    If so, Can you please guide me with the steps?
    If not, what is the alternative?
    Thanks and regards
    Deepa

    Hi,
    Now I have created a gridlayout containing a checkbox and text and has placed it as a treenode component.
    The code for the same is as follows.
    //DynPage
    Create output. Called once per request.
        public void doProcessBeforeOutput() throws PageException {
           // get the form from DynPage
            Form form = (Form) this.getForm();
            Tree tree = new Tree("sample", "sample");
            tree.setTooltip("Personalize your content");
           TreeNode rootNode = new TreeNode("sample","sample");
            rootNode.setOpen(true);
            rootNode.setText("Root Folder");
            rootNode.setComponent(getCustomNodeComponent(rootNode));
            rootNode.setTooltip("samplepersonalization");
            rootNode.setOnNodeClick("onNodeClick");
            tree.setRootNode(rootNode);
            TreeNode firstLevel = new TreeNode("folders", "folder",rootNode);
            firstLevel.setText("folder");
            firstLevel.setComponent(getCustomNodeComponent(firstLevel));
            firstLevel.setOnNodeClick("onNodeClick");
            form.addComponent(tree);
          // create your GUI here....
       public GridLayout getCustomNodeComponent(TreeNode node)
              GridLayout personalize = new GridLayout();
              personalize.setId("personalize");
              personalize.setCellSpacing(5);
              //personalize.setWidth("50%");
              //personalize.setDebugMode(true);
              String nodeName = node.getText();
              GridLayoutCell cell1 = new GridLayoutCell("cell1");
              cell1.setContent("<p style=\"font-family:Arial;font-size:70%\">"nodeName"</p>");
                        personalize.addCell(1,1,cell1);
              GridLayoutCell cell2 = new GridLayoutCell("cell2");
              Checkbox checkBox = new Checkbox(nodeName+"check");
              checkBox.setChecked(true);
              cell2.setContent(checkBox);
                        personalize.addCell(1,2,cell2);
              return personalize;
    And the tree is also rendered fine with checkbox at each node.
    Now my question is how will I get the value of checkbox component in the TreeNode?
    Can anyone help me out in this?
    Regards
    Deepa
    Message was edited by: Deepa  Jampunathan

  • Tree (TreeView) in Applet

    Hello,
    could you please give a hint how I can use TreeView in applets?
    Actually I need a code example of how to add a TreeView component to an applet.

    Let me be your google agent. Rather than have you waste your time typing in a web search query, you can just click on this link:
    http://www.google.com/search?hl=en&q=applet+TreeView+example

  • Treeview Recommendation for HTML5?

    I have a flash extension for my application that I need to rewrite in HTML5.  I'm wondering if anyone has any suggestions for a decent (preferably free but at least very cheap - I don't even cover my costs with sales) treeview component I can use with my application.  Here's a video of my old treeview in use.  What I'm after is:
    - Populate Treeview from file.
    - Ability to change icons
    - Ability to call .jsx function by clicking end node.
    - Standard collapse / expand functionality
    - No need to add nodes on the fly etc.
    Any help greatly appreciated.

    You could do it with CSS and <ul> / <li> tags: http://experiments.wemakesites.net/css3-treeview.html

  • I need a TreeView

    Hi all,
    I need a TreeView component for an upcoming project, but unfortunately it seems like JavaFX has not yet provided one. Any tips on how I should go about it? Should I use a ListView, and create my own cutomized Nodes that has the functionality of collapsing/expanding the list of children nodes?

    Hi Carl,
    you could use a JTree wraped in Javafx.
    Code:
    package controlcenter_v4;
    import javafx.ext.swing.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import java.lang.Object;
    class MyTreeCell {
        public var text: String;
        public var cells: MyTreeCell[];
        public var value: Object;
        override function toString ():String {
            return text;
    class MyTree extends SwingComponent{
        var tree: JTree;
        var model: DefaultTreeModel;
        public var selectedValue: java.lang.Object;
        public var action: function(obj:Object);
        public var root: MyTreeCell on replace{
            if (root != null){
                model.setRoot(getCell(root));
                var obj = model.getRoot();
                var tp = new TreePath(obj);
        override function createJComponent(): JComponent {
            tree = new JTree();
            model = tree.getModel() as DefaultTreeModel;
            var  mouseListener = java.awt.event.MouseAdapter {
                override function mousePressed(e: java.awt.event.MouseEvent) {
                    var selRow = tree.getRowForLocation(e.getX(), e.getY());
                    var selPath = tree.getPathForLocation(e.getX(), e.getY());
                    var lastPath = selPath.getPathComponent(selPath.getPathCount() - 1);
                    var obj = (lastPath as DefaultMutableTreeNode).getUserObject();
                    if(action != null ){
                       action(obj);
                    if(selRow != - 1) {
                        if(e.getClickCount() == 1) {
                            selectedValue = obj;
                        else if(e.getClickCount() == 2) {
                    getJComponent().repaint();
            tree.addMouseListener(mouseListener);
            tree.setRootVisible(false);
            var scrollPane = new JScrollPane(tree);
            return scrollPane;
        function getCell(cell: MyTreeCell): MutableTreeNode {
            var node = new DefaultMutableTreeNode(cell);
            for (c  in  cell.cells ){
                node.<<insert>>(getCell(c),node.getChildCount());
            return node;
    }Here is some example code how to use it:
    Example:
    Scene {
        content: [
            MyTree{
                root: MyTreeCell{
                    text: "Root"
                    cells: [
                        MyTreeCell{
                            text: "Letters"
                            cells:[
                                MyTreeCell{
                                    text: "a"
                                MyTreeCell{
                                    text: "b"
                        MyTreeCell{
                            text: "Digits"
                            cells: for( i in [0..9]) MyTreeCell{ text: "{i}"}
                action: function(obj:Object){
                    println("Selected object: {obj}");
    }source: [http://jfx.wikia.com/wiki/SwingComponents|http://jfx.wikia.com/wiki/SwingComponents]
    Edited by: Jazzor on Jun 24, 2009 12:16 AM

  • Read Memory with "processmemory"

    Hello to All 
    I'm doing a project porting from 32-bit Delphi, Visual C # to a 64-bit 
    in this project I had a procedure called "processmemory" who gave me the exact copy of the contents of a treeview component of an external application in a treeview component of my application 
    I can not find anything like it or translate it to delphi ac # 
    or even tried to use the command AutomationElement me but unfortunately this law only the nodes that are currently open in the application of the other component 
    At this point I have two choices 
    1) convert the code from Delphi to c # but valid for 64 bit 
    2) use AutomationElement but also understand how to read the closed elements or find a way how to open all nodes of the external application and then read 
    I'll post the code below processmemory
    unit uProcessMemMgr;
    author: Michael Winter, [email protected]
    ver:    0.10, 2005-04-27
    desc:
    Provides access to memory of other processes currently running on the same
    machine. Memory can be allocated and deallocated inside the context of the
    other process. Read and write operations supported, not limited to portions
    of memory allocated by the object. Works for the own process, too.
    notes:
    You need one TProcessMemMgr object for each process.
    Freeing the TProcessMemMgr frees all memory allocated for the appropriate
    process.
    Please report any problems with this unit to the email address above.
    interface
    uses
      Windows, Classes,sysutils;
    const
      MemMgrMemSize = 16*1024;
    type
      TProcessMemMgr = class(TObject)
      public
        function AllocMem(Bytes: Cardinal): Pointer; virtual; abstract;
        procedure FreeMem(P: Pointer); virtual; abstract;
        procedure Read(Source: Pointer; var Dest; Bytes: Cardinal); virtual; abstract;
        function ReadStr(Source: PChar): String; overload; virtual; abstract;
        function ReadStr(Source: Pointer; Bytes: Cardinal): String; overload;
        procedure Write(const Source; Dest: Pointer; Bytes: Cardinal); virtual; abstract;
        procedure WriteStr(const Str: String; Dest: Pointer); virtual; abstract;
      end;
    function CreateProcessMemMgr(ProcessID: Cardinal): TProcessMemMgr;
    function CreateProcessMemMgrForWnd(Wnd: HWND): TProcessMemMgr;
    implementation
    type
      EProcessMemMgr = class(Exception);
      TOwnProcessMemMgr = class(TProcessMemMgr)
      private
        FMemList: TThreadList;
      public
        constructor Create;
        destructor Destroy; override;
        function AllocMem(Bytes: Cardinal): Pointer; override;
        procedure FreeMem(P: Pointer); override;
        procedure Read(Source: Pointer; var Dest; Bytes: Cardinal); override;
        function ReadStr(Source: PChar): String; override;
        procedure Write(const Source; Dest: Pointer; Bytes: Cardinal); override;
        procedure WriteStr(const Str: String; Dest: Pointer); override;
      end;
      TForeignProcessMemMgr = class(TProcessMemMgr)
      private
        FProcess: THandle;
        FMemList: TThreadList;
      protected
        procedure NeedMoreMem(Bytes: Cardinal); virtual; abstract;
      public
        constructor Create(ProcessID: Cardinal);
        destructor Destroy; override;
        function AllocMem(Bytes: Cardinal): Pointer; override;
        procedure FreeMem(P: Pointer); override;
        procedure Read(Source: Pointer; var Dest; Bytes: Cardinal); override;
        function ReadStr(Source: PChar): String; override;
        procedure Write(const Source; Dest: Pointer; Bytes: Cardinal); override;
        procedure WriteStr(const Str: String; Dest: Pointer); override;
      end;
      TWin9xProcessMemMgr = class(TForeignProcessMemMgr)
      private
        FSharedList: TList;
      protected
        procedure NeedMoreMem(Bytes: Cardinal); override;
      public
        constructor Create(ProcessID: Cardinal);
        destructor Destroy; override;
      end;
      TWinNTProcessMemMgr = class(TForeignProcessMemMgr)
      private
        FAllocList: TList;
      protected
        procedure NeedMoreMem(Bytes: Cardinal); override;
      public
        constructor Create(ProcessID: Cardinal);
        destructor Destroy; override;
      end;
      PMemRec = ^TMemRec;
      TMemRec = record
        Start: Pointer;
        Size: Cardinal;
        Group: Integer;
        Used: Boolean;
      end;
      TSimpleSharedMem = class(TObject)
      private
        FMapping: THandle;
        FBaseAddr: Pointer;
      public
        constructor Create(Size: Cardinal);
        destructor Destroy; override;
        property BaseAddr: Pointer read FBaseAddr;
      end;
    { Win95 doesn't export these functions, thus we have to import them dynamically: }
    var
      VirtualAllocEx: function (hProcess: THandle; lpAddress: Pointer;
        dwSize, flAllocationType: DWORD; flProtect: DWORD): Pointer; stdcall = nil;
      VirtualFreeEx: function(hProcess: THandle; lpAddress: Pointer;
            dwSize, dwFreeType: DWORD): Pointer; stdcall = nil;
    procedure NeedVirtualAlloc;
    var
      H: HINST;
    begin
      if @VirtualFreeEx <> nil then exit;
      H := GetModuleHandle(kernel32);
      if H = 0 then
        RaiseLastWin32Error;
      @VirtualAllocEx := GetProcAddress(H, 'VirtualAllocEx');
      if @VirtualAllocEx = nil then
        RaiseLastWin32Error;
      @VirtualFreeEx := GetProcAddress(H, 'VirtualFreeEx');
      if @VirtualFreeEx = nil then
        RaiseLastWin32Error;
    end;
    { TProcessMemMgr }
    function TProcessMemMgr.ReadStr(Source: Pointer; Bytes: Cardinal): String;
    begin
      SetLength(Result, Bytes);
      if Bytes > 0 then
        Read(Source, Result[1], Bytes);
    end;
    { TOwnProcessMemMgr }
    function TOwnProcessMemMgr.AllocMem(Bytes: Cardinal): Pointer;
    begin
      Result := AllocMem(Bytes); //2048; //SysUtils.AllocMem(Bytes);
      FMemList.Add(Result);
    end;
    constructor TOwnProcessMemMgr.Create;
    begin
      inherited;
      FMemList := TThreadList.Create;
    end;
    destructor TOwnProcessMemMgr.Destroy;
    var
      i: Integer;
    begin
      if Assigned(FMemList) then begin
        with FMemList.LockList do try
          for i := 0 to Count - 1 do
            System.FreeMem(Items[i]);
        finally
          FMemList.UnlockList;
        end;
        FMemList.Free;
      end;
      inherited;
    end;
    procedure TOwnProcessMemMgr.FreeMem(P: Pointer);
    begin
      FMemList.Remove(P);
      System.FreeMem(P);
    end;
    procedure TOwnProcessMemMgr.Read(Source: Pointer; var Dest; Bytes: Cardinal);
    begin
      System.Move(Source^, Dest, Bytes);
    end;
    function TOwnProcessMemMgr.ReadStr(Source: PChar): String;
    begin
      Result := Source;
    end;
    procedure TOwnProcessMemMgr.Write(const Source; Dest: Pointer; Bytes: Cardinal);
    begin
      System.Move(Source, Dest^, Bytes);
    end;
    procedure TOwnProcessMemMgr.WriteStr(const Str: String; Dest: Pointer);
    begin
      StrPCopy(Dest, Str);
    end;
    { TForeignProcessMemMgr }
    function TForeignProcessMemMgr.AllocMem(Bytes: Cardinal): Pointer;
    var
      t: Integer;
      i: Integer;
      Rec, NewRec: PMemRec;
      Remain: Cardinal;
    begin
      Result := nil;
      with FMemList.LockList do try
        for t := 0 to 1 do begin
          for i := 0 to Count - 1 do begin
            Rec := Items[i];
            if not Rec^.Used and (Rec^.Size >= Bytes) then begin
              Remain := Rec^.Size - Bytes;
              Rec^.Size := Bytes;
              Rec^.Used := true;
              Result := Rec^.Start;
              if Remain > 0 then begin
                New(NewRec);
                NewRec^.Start := Pointer(Cardinal(Result) + Cardinal(Bytes));
                NewRec^.Size := Remain;
                NewRec^.Group := Rec^.Group;
                NewRec^.Used := false;
                Insert(i + 1, NewRec);
              end;
              exit;
            end;
          end;
          NeedMoreMem(Bytes);
        end;
        raise EProcessMemMgr.Create('ProcessMemMgr.AllocMem: not enough memory');
      finally
        FMemList.UnlockList;
      end;
    end;
    constructor TForeignProcessMemMgr.Create(ProcessID: Cardinal);
    begin
      inherited Create;
      FProcess := OpenProcess(PROCESS_VM_OPERATION or PROCESS_VM_READ or PROCESS_VM_WRITE, false, ProcessID);
      if FProcess = 0 then RaiseLastWin32Error;
      FMemList := TThreadList.Create;
    end;
    destructor TForeignProcessMemMgr.Destroy;
    var
      i: Integer;
    begin
      if Assigned(FMemList) then begin
        with FMemList.LockList do try
          for i := 0 to Count - 1 do
            Dispose(PMemRec(Items[i]));
        finally
          FMemList.UnlockList;
        end;
        FMemList.Free;
      end;
      CloseHandle(FProcess);
      inherited;
    end;
    procedure TForeignProcessMemMgr.FreeMem(P: Pointer);
    var
      i, j: Integer;
      Rec, NextRec: PMemRec;
    begin
      with FMemList.LockList do try
        for i := 0 to Count - 1 do begin
          Rec := Items[i];
          if Rec^.Start = P then begin
            Rec^.Used := false;
            j := i + 1;
            while j < Count do begin
              NextRec := Items[j];
              if NextRec^.Used then exit;
              if NextRec^.Group <> Rec^.Group then exit;
              inc(Rec^.Size, NextRec^.Size);
              Dispose(NextRec);
              Delete(j);
            end;
            exit;
          end;
        end;
        Assert(false, 'ProcessMemMgr.FreeMem: unknown pointer');
      finally
        FMemList.UnlockList;
      end;
    end;
    procedure TForeignProcessMemMgr.Read(Source: Pointer; var Dest; Bytes: Cardinal);
    var
      BytesRead: Cardinal;
    begin
      if not ReadProcessMemory(FProcess, Source, @Dest, Bytes, BytesRead) then
        RaiseLastWin32Error;
    end;
    function TForeignProcessMemMgr.ReadStr(Source: PChar): String;
    var
      BytesRead: Cardinal;
      OldSz, DeltaSz, NewSz: Integer;
      Buf: PChar;
      i: Integer;
      Found: Integer;
    begin
      Result := '';
      if Source = nil then exit;
      Buf := nil;
      OldSz := 0;
      DeltaSz := $1000 - (Cardinal(Source) and $FFF);
      Found := -1;
      try
        while Found < 0 do begin
          NewSz := OldSz + DeltaSz;
          System.ReallocMem(Buf, NewSz);
          if not ReadProcessMemory(FProcess, Source + OldSz, Buf + OldSz , DeltaSz, BytesRead) then
            RaiseLastWin32Error;
          for i := OldSz to NewSz - 1 do begin
            if Buf[i] = #0 then begin
              Found := i;
              break;
            end;
          end;
          OldSz := NewSz;
          DeltaSz := $1000;
        end;
        SetLength(Result, Found);
        if Found > 0 then
          System.Move(Buf^, Result[1], Found);
      finally
        System.FreeMem(Buf);
      end;
    end;
    procedure TForeignProcessMemMgr.Write(const Source; Dest: Pointer; Bytes: Cardinal);
    var
      BytesWritten: Cardinal;
    begin
      if not WriteProcessMemory(FProcess, Dest, @Source, Bytes, BytesWritten) then
        RaiseLastWin32Error;
    end;
    procedure TForeignProcessMemMgr.WriteStr(const Str: String; Dest: Pointer);
    begin
      Write(PChar(Str)^, Dest, Length(Str) + 1);
    end;
    { TWin9xProcessMemMgr }
    constructor TWin9xProcessMemMgr.Create(ProcessID: Cardinal);
    begin
      inherited;
      FSharedList := TList.Create;
    end;
    destructor TWin9xProcessMemMgr.Destroy;
    var
      i: Integer;
    begin
      if Assigned(FSharedList) then begin
        for i := FSharedList.Count - 1 downto 0 do
          TSimpleSharedMem(FSharedList[i]).Free;
        FSharedList.Free;
      end;
      inherited;
    end;
    procedure TWin9xProcessMemMgr.NeedMoreMem(Bytes: Cardinal);
    var
      Ix: Integer;
      Share: TSimpleSharedMem;
      Rec: PMemRec;
    begin
      if Bytes < MemMgrMemSize then
        Bytes := MemMgrMemSize
      else
        Bytes := (Bytes + $FFF) and not $FFF;
      Share := TSimpleSharedMem.Create(Bytes);
      Ix := FSharedList.Add(Share);
      New(Rec);
      Rec^.Start := Share.BaseAddr;
      Rec^.Size := Bytes;
      Rec^.Group := Ix;
      Rec^.Used := false;
      FMemList.Add(Rec);
    end;
    { TWinNTProcessMemMgr }
    constructor TWinNTProcessMemMgr.Create(ProcessID: Cardinal);
    begin
      inherited;
      NeedVirtualAlloc;
      FAllocList := TList.Create;
    end;
    destructor TWinNTProcessMemMgr.Destroy;
    var
      i: Integer;
    begin
      if Assigned(FAllocList) then begin
        for i := 0 to FAllocList.Count - 1 do
          VirtualFreeEx(FProcess, FAllocList[i], 0, MEM_RELEASE);
        FAllocList.Free;
      end;
      inherited;
    end;
    procedure TWinNTProcessMemMgr.NeedMoreMem(Bytes: Cardinal);
    var
      Ix: Integer;
      Alloc: Pointer;
      Rec: PMemRec;
    begin
      if Bytes < MemMgrMemSize then
        Bytes := MemMgrMemSize
      else
        Bytes := (Bytes + $FFF) and not $FFF;
      Ix := FAllocList.Count;
      Alloc := VirtualAllocEx(FProcess, nil, MemMgrMemSize, MEM_COMMIT, PAGE_READWRITE);
      if Alloc = nil then RaiseLastWin32Error;
      FAllocList.Add(Alloc);
      New(Rec);
      Rec^.Start := Alloc;
      Rec^.Size := Bytes;
      Rec^.Group := Ix;
      Rec^.Used := false;
      FMemList.Add(Rec);
    end;
    { TSimpleSharedMem }
    constructor TSimpleSharedMem.Create(Size: Cardinal);
    var
      PerfCount: Int64;
      UniqueName: String;
    begin
      inherited Create;
      QueryPerformanceCounter(PerfCount);
      UniqueName := 'mw_pmm_' + IntToHex(PerfCount, 16);
      FMapping := CreateFileMapping(Cardinal(-1), nil, PAGE_READWRITE, 0, Size, PChar(UniqueName));
      if FMapping = 0 then
        RaiseLastWin32Error;
      FBaseAddr := MapViewOfFile(FMapping, FILE_MAP_WRITE, 0, 0, Size);
      if not Assigned(FBaseAddr) then
        RaiseLastWin32Error;
    end;
    destructor TSimpleSharedMem.Destroy;
    begin
      UnmapViewOfFile(FBaseAddr);
      CloseHandle(FMapping);
      inherited;
    end;
    function CreateProcessMemMgr(ProcessID: Cardinal): TProcessMemMgr;
    begin
      if ProcessID = GetCurrentProcessId then begin
        Result := TOwnProcessMemMgr.Create;
      end else begin
        if Win32Platform = VER_PLATFORM_WIN32_NT then
          Result := TWinNTProcessMemMgr.Create(ProcessID)
        else
          Result := TWin9xProcessMemMgr.Create(ProcessID);
      end;
    end;
    function CreateProcessMemMgrForWnd(Wnd: HWND): TProcessMemMgr;
    var
      PID: Cardinal;
    begin
      PID := 0;
      GetWindowThreadProcessId(Wnd, @PID);
      Result := CreateProcessMemMgr(PID);
    end;
    end.
    Wacky Teseo

    Hi Wacky Teseo,
    This forum is to discuss problems of Windows Forms. Your question is related to TreeNode in winForms, but the conversion between C# and Delphi is not supported here.
    You could consider posting it at the Delphi forum
    for some solutions in Delphi. Thanks!
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Save for Web and Devices - vertical limited to 8192px

    I'm not sure if this is a bug/limitation in Photoshop CS4, or of the file format itself, but I suspect the former.
    I've got a .gif 18x8888 (a sprite used in the YUI Treeview component) and PS refuses to export it other than by forcing a resize down to 17x8192. I've had to resort to File/Save As then Open/Save in Preview to get the filesize down to what it should be (what *is* that extra metadata PS saves inside .gifs?!)
    Anyone else hit this? It seems pretty limiting considering digital photos are nearing those sorts of resolutions. Same limitation when exporting as a .png by the way.
    Cheers,
    Mike

    It's definitely a bug/limitation in CS4. I've got a perfectly valid 18x8888 .gif image created via Preview (and also ImageMagick). Jim: you're correct that previous versions handled them ok.
    @Nini
    Although I agree that it would be questionable to upload a digital photo of that size, it's a very valid technique, used widely across modern JavaScript frameworks. For this particular image used by the Treeview, it means 1x8k HTTP request, rather than 16 or 17 slightly smaller HTTP requests for individual images. The technique improves performance through both bandwidth and browser resource savings. Google "CSS sprites" for reference.

  • MScomctl.o​cx problem

    I'm using TreeView component from MScomctl.ocx ver.6.
    Problem appears when I try to run my Vi on the PC where MS Office isn't
    installed.
    I registered OCX by means of regsvr32 successfully but my Vi can't load
    TreeView componenet.
    When I try to load it manualy : pop up menu on the ActiveX container ->
    Insert ActiveX Object - Microsoft TreeView Control 6 is available but after
    selection there is nothing happen and my ActiveX container remains still
    empty.
    This case concerns W2K. On the PC with W98 that ActiveX control acts in a
    symilar way with a one difference, I can load TreeView Control manualy from
    popup menu on ActiveX container.
    With regards
    Grzegorz Bialic

    Grzegorz,
    1 - These controls are not licensed for use on a "clean machine", or in your case a machine that does not have MS Office installed. The license is installed by VB. The controls should work after installing Visual Studio.
    2 - VB ships a reg file you can merge into your registry called VBCTRLS.REG
    3 - More information in http://support.microsoft.com/support/kb/articles/q​177/7/99.asp
    I saw on another post on the same issue that registering also nicont.dll and nicontdt.dll fixed this problem, so you can try that first.
    Zvezdana S.
    National Instruments

  • Creating a TreeView using an SQL data source

    Hello and how is everyone. I have been coding in Java Windows services and console applications for a couple of years and now I want to start working on some Java Server Pages. I have been reading up on JSP and JSTL. What I want to do is query an SQL database and bring the data into my jsp page and display the data using a TreeView. Can someone help out ? Thanks :)

    If you want a tree component on a web page, you will have to use html/javascript to do that.
    You can't use swing components in an html page.
    Take a look around at javascript tree components (there are several around the net). You then have to write your jsp to generate the correct javascript code to populate that component.
    Obviously it all depends on the javascript component that you decide on to display the tree.
    Hope this helps,
    evnafets

  • Using TreeViewer and creating a pop-up menu?

    I am using Eclipse Ganymede(3.1?) to write my program. This project has multiple parts(most issues/progress can be tracked back in java-forums.org) and I am trying to get the last bit of my GUI finished. I have a TreeViewer that displays on top of a composite display(not a component) which is why I haven't been able to find a solution that works for me. My tree is interactive(double click nodes to expand, deepest nodes open up an editor view, auto refresh new nodes/deletes etc) and I'm trying to make a pop-up menu appear on right click that would give all the options the File menu gives. I haven't been able to find a work around on how to attach the menu since my TreeViewer is based on a composite instead of a component there is no where to attach the menu. I have been working on this one issue for a week with no progress and am at the point where I'm tempted to rewrite my entire project using JPanel and JPanes and Tree but I REALLY don't want to have to do this. This is my createPartControl method with the relevent sections.
    public void createPartControl(final Composite parent) {
    //          final Tree tree = new Tree(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
              treeViewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
    //          treeViewer = new TreeViewer(tree);
              treeViewer.setContentProvider(new ViewContentProvider());
              treeViewer.setLabelProvider(new ViewLabelProvider());
              treeViewer.setInput(createDummyModel());
    //Double click listener
              treeViewer.addOpenListener(new IOpenListener() {
                   public void open(final OpenEvent event) {
                        //double click expands/shrinks nodes, opens up target editors
    //Selection listener
              treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
                      public void selectionChanged(SelectionChangedEvent event) {
                           final IActionBars bars = getViewSite().getActionBars();
                           selObj = ((IStructuredSelection) event.getSelection()).getFirstElement();                      
                                      //...outputs selection to status bar
    //Mouse listener
              treeViewer.getTree().addMouseListener(new MouseAdapter(){
                 public void mouseUp(MouseEvent event){
                      if(event.button==3){         //right click
                           System.out.println(event.getSource());        //Tree{ }
                           System.out.println(event.display);             //org.eclipse.swt.widgets.Display@1e328e0
                           if(selObj instanceof Server){
                                System.out.println(treeViewer.getControl().toString());          //Same as event.getSource()
                                               /*code to have menu appear goes here*/
                                System.out.println("Server Menu");
                                //Delete Server
                                //Edit Server
                                //View Properties
         }Does anybody know a way I can attach a popup menu to the node I click on or if it's possible(and if so how would I go about) attaching it to the display beneath the TreeViewer and somehow setting the focus or making the popup a heavy component so it would appear on top?
    P.S there's alot more superfluous code in the listeners but they don't pertain to this so I removed them.

    Can anyone confirm that what I'm trying to do is not possible? I found this link which states an SWT bug of the header not being a control so it become unattachable. http://dev.eclipse.org/newslists/news.eclipse.platform.swt/msg38040.html
    Any truth in this and if so where can I track progress of the bug?

  • Garbage Collection Issue for Tree Component

    Dear:
    When I created a new Tree instance dynamically by following code, and clicked any tree node randomly and then I removed it via another button, but I found this instance couldn’t be removed by GC, if I just created this tree without mouse action, it can be removed by GC.
    Tree Component:
    -- TreeView
    <mx:canvas>
    <mx:Tree dataProvider="{data}"  />   // data is a XML staments
    </mx:canvas>
    Create Tree:
               public function createView(event:Event):void{
                  var view:TreeView = new TreeView ();
                  view.name="myTree";
                  addChild(view);
                  view=null;
    Remove Tree:
               public function deleteView(event:Event):void{
                  var view:TreeView= TreeView( _con.getChildByName("myTree"));
                  removeChild(view);
    Could someone give me some suggestion?
    Thanks a lot

    Hi ajmcfarlane,
    This is my first post here. I'm fairly new to AS3 still and
    have been getting my education from a number of places. The best
    education i have found is from the book located at
    http://www.learningactionscript3.com/
    Rich Shupe address this problem of removing the child from
    memory. I Downloaded your file and found 2 problems and resolved
    one of them. By now you might have already solved this anyway.
    To remove the child from the Display List use -->
    removeChild(myChildObject);
    To remove the object from memory use --> myChildObject =
    null;
    You did these two steps but in the incorrect order, just by
    moving the 'myChildObject = null' under the removeChild code makes
    it work.
    I found running a few trace statements after fixing the first
    problem, i found the second problem. The error of trying to remove
    a child when it is no longer there.
    You just need to rework the design so that the order of
    events fires as you want. Below is the traces i used and the output
    that is received.
    function Click1(e:MouseEvent){
    trace("four ", loadedcontent);
    modLoader.unload();
    modLoader = null;
    function unloadCompleteHandler(event:Event):void{
    trace("one ", loadedcontent);
    removeChild(loadedcontent);
    trace("two ", loadedcontent);
    loadedcontent = null;
    trace("three ", loadedcontent);
    output
    Loaded mem: 20668 KB
    four [object MainTimeline]
    one [object MainTimeline]
    two [object MainTimeline]
    three null
    unLoaded mem: 23352 KB
    So you can see the click event is firing of the unload first,
    when i think you want that last.
    I hope this has been of some help :)

  • layout:treeview Closed tree structure?

    HI,
    I'm able to generate the tree view structure
    but the problem is, when close & open the window , it is showing open tree structure
    i want it to be close tree view
    <layout:treeview  expandedLevelsAtFirst="-1" >
         <logic:present name="agrovoc" >
         <logic:iterate id="agrovoc" name="agrovoc" scope="session">
                   <c:set var="term" value="${agrovoc.AGTerm}" />
                   <c:set var="bterm" value="${agrovoc.AGBTerm}" />
                   <c:set var="nterm" value="${agrovoc.AGNTerm}" />
                   <c:set var="rterm" value="${agrovoc.AGRTerm}" />
                   <layout:menuItem key="${agrovoc.AGURI}" link="#" >
                        <logic:notEmpty name="bterm">
                        <layout:menuItem key="BroaderTerms">
                       <layout:menuItem key="${agrovoc.AGBURI}" link="#"/>
                       </layout:menuItem>
                       </logic:notEmpty>
                       <logic:notEmpty name="nterm">
                       <layout:menuItem key="NarrowerTerms">
                       <layout:menuItem key="${agrovoc.AGNURI}" link="#" />
                       </layout:menuItem>
                       </logic:notEmpty>
                       <logic:notEmpty name="rterm">
                       <layout:menuItem key="RelatedTerms">
                       <layout:menuItem key="${agrovoc.AGRURI}" link="#" />
                       </layout:menuItem>
                       </logic:notEmpty>
                   </layout:menuItem>
         </logic:iterate>
         </logic:present>
         </layout:treeview>I'm using the above code, the tree structure in turn call the java script for tits operations
    i even cleared the session object also, but no use..
    how to solve this..?

    Thanks a lot for the help so far, I've created a method to check the basePanel for any components it holds and try to create a JTree display from it. The code I currently have is :
         public void updateObjectSelector()
              // Setup the tree viewer
              DefaultMutableTreeNode root = new DefaultMutableTreeNode(basePanel.getClass());
              addChildren(root, basePanel);
              tree = new JTree(root);
         public void addChildren(DefaultMutableTreeNode root, JPanel parent)
              Component [] children = parent.getComponents();
              for(int i = 0; i < children.length; i++)
                   DefaultMutableTreeNode child = new DefaultMutableTreeNode(children.getClass());
                   try
                        addChildren(child, (JPanel) children[i]);
                   catch(ClassCastException e)
                   root.add(child);
    basePanel and tree are both global variables. basePanel is the root Panel to which everything is added to.
    I am calling "updateObjectSelector()" every time a component is added to the basePanel but at the moment all I can get displayed by the JTree is the getClass() of the basePanel, none of its children are being displayed. Can anyone see what I have done wrong here?
    Many thanks again for all your help so far.

  • An event about TreeView

    Hi, everyone.
    Below is my code:
    <hbj:treeNode
           d="NB_Acer_AMD"
           text="AMD"
           onNodeClick="onNode_AllGoods"                 
    />
    I have already create a method 'onNode_AllGoods' in my JSPDynPage.
    But it still has something wrong.
    Can anyone help me solve this problem?
    Or give me some example about TreeView.
    Thx a lot o

    HI,
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/0c/9e0e41a346ef6fe10000000a1550b0/frameset.htm">Tree View</a>
    Code
    ======
    JSP
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId" >
         <hbj:tree
              id="Tree1"
              title="Available Worksets"
              tooltip="Available Worksets"
              >
              <hbj:treeNode
                   id="root"
                   text="Desk"
                   isOpen="true"
                   tooltip="Start"
              >
              <hbj:treeNode
                   id="Node1"
                   text="Item1"
                   isOpen="true"
              >
              <hbj:treeNode
                     id="Item1_1"
                     text="floppy"
               />
               <hbj:treeNode
                     id="Item1_2"
                     text="Harddisk"
               />
               <hbj:treeNode
                     id="Item1_3"
                     text="CD"
               />
               </hbj:treeNode>
              <hbj:treeNode
                   id="Node2"
                   text="Item2"
                   isOpen="true"
                   tooltip="Item2"
              >
              <hbj:treeNode
                        id="Item2_1"
                        text="1"     onNodeClick="Item1click" />
              <hbj:treeNode
                        id="Item2_2"
                        text="2" />
              <hbj:treeNode
                        id="Item2_3"
                        text="3" />          
              </hbj:treeNode>
         </hbj:treeNode>
         </hbj:tree>                    
       </hbj:form>
      </hbj:page>
    </hbj:content>
    JSPDYNPAGE
    ===============
    package com.cts.anand;
    import com.sapportals.htmlb.*;
    import com.sapportals.htmlb.enum.*;
    import com.sapportals.htmlb.event.*;
    import com.sapportals.htmlb.page.*;
    import com.sapportals.portal.htmlb.page.*;
    import com.sapportals.portal.prt.component.*;
    public class TreeView extends PageProcessorComponent {
      public DynPage getPage(){
        return new TreeViewDynPage();
      public static class TreeViewDynPage extends JSPDynPage{
        public void doInitialization(){
        public void item1click(Event e) {
             IPortalComponentResponse resp=null;
             resp.write("Item1 Click");
        public void doProcessAfterInput() throws PageException {
        public void doProcessBeforeOutput() throws PageException {
          this.setJspName("TreeJSP.jsp");

  • Flash TreeView menu and user interaction

    Hi,
    I've developed in Javascript a TreeView menu.
    I would like to do the same in Flash/AS but i do not know
    where to start :-(
    before to start i would like to know :
    - if it is possible to make this TreeView menu dynamic ?
    i mean by that that web developer could use this TreeView
    menu by adding
    several nodes and children to this menu like :
    MyFlashMenu.addChild("new node", "parent node", imageNode);
    but i do not know if from web page it is possible to pass
    arguments to
    flash.
    thanks a lot,
    A.

    Sorry, I meant GhostWire, not GhostWriters...
    http://ghostwire.com
    -ML
    "Marc Lee" <[email protected]> wrote in message
    news:fju6kl$97j$[email protected]..
    > I've been using a 3rd-party treeview from GhostWriters.
    That tv would
    allow
    > dynamic updates. We're doing it. I'm not familiar with
    the V2 component
    > treeview (a built-in for Flash 8 and later), but I would
    imagine that
    would
    > allow dynamic updates as well.
    >
    > There is an API to the Flash player that is embedded in
    your webpage that
    > should allow you to pass commands to your tree. I don't
    have the
    > documentation right in front of me but you should be
    able to find it quite
    > easily through googling.
    >
    > Contact me offline if you'd like to discuss more.
    >
    > HTH,
    >
    > Marc Lee
    >
    > "R.A.F." <[email protected]> wrote in message
    > news:fjrrvr$j3s$[email protected]..
    > > Hi,
    > >
    > > I've developed in Javascript a TreeView menu.
    > > I would like to do the same in Flash/AS but i do
    not know where to start
    > :-(
    > >
    > > before to start i would like to know :
    > > - if it is possible to make this TreeView menu
    dynamic ?
    > >
    > > i mean by that that web developer could use this
    TreeView menu by adding
    > > several nodes and children to this menu like :
    > >
    > > MyFlashMenu.addChild("new node", "parent node",
    imageNode);
    > >
    > > but i do not know if from web page it is possible
    to pass arguments to
    > > flash.
    > >
    > > thanks a lot,
    > >
    > > A.
    >
    >

Maybe you are looking for

  • Does image Drag N Drop work on WinXP?

    I tried the program from techtips http://java.sun.com/developer/JDCTechTips/2003/tt0318.html and I can't drag an image file from window explorer and drop it to the program but I can drag n drop the image if I launch two instances of this program. Any

  • Getting the standard Notes App for Mac

    My ipad and iphone have the notes app. How do i get notes on my Mac? It is not available in the Mac AppStore and I can not find it among the apps included with the Mac. I have Mobile Me but I can't sync my notes only the contacts and calendar.?

  • Is there an app where you can take PROFESSIONAL photos?

    I love taking pictures & i wanted to know if there was an app for professional photos.?

  • Folder exclamation thing...

    when trying to turn on my ipod it goes directly from the apple, to the folder exclamation pic, and ALSO windows and itunes wont recognize the ipod either, i used a different ipod 5 mins prior to this one and it worked, so its not the pc, and i put it

  • Tree - selecting and expanding root node

    I want to have a tree root node expanded at start. I have tried: tree.selectedIndex = 0; if (tree.selectedItem && tree.dataDescriptor.isBranch(tree.selectedItem))      tree.expandChildrenOf(tree.selectedItem, true); ...but it doesnt work. Anyone ...?