473,659 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Treemap Nothing Show up

I copied the example

Compile is successful .net 2003

but i press button , nothing to show

but the example has box show up, why ? where 's wrong?

using System;
using System.Drawing;
using System.Collecti ons;
using System.Componen tModel;
using System.Windows. Forms;
using System.Data;
using Microsoft.Resea rch.CommunityTe chnologies.Tree map;
using System.Xml;

namespace treemap
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows. Forms.Form
{
private
Microsoft.Resea rch.CommunityTe chnologies.Tree map.TreemapCont rol
treemapControl1 ;
private System.Windows. Forms.Button build_button;
/// <summary>
/// Required designer variable.
/// </summary>
private System.Componen tModel.Containe r components = null;

public Form1()
{
InitializeCompo nent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Disp ose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeCompo nent()
{
this.treemapCon trol1 = new
Microsoft.Resea rch.CommunityTe chnologies.Tree map.TreemapCont rol();
this.build_butt on = new System.Windows. Forms.Button();
this.SuspendLay out();
//
// treemapControl1
//
this.treemapCon trol1.BorderCol or =
System.Drawing. SystemColors.Wi ndowFrame;
this.treemapCon trol1.DiscreteN egativeColors = 20;
this.treemapCon trol1.DiscreteP ositiveColors = 20;
this.treemapCon trol1.FontFamil y = "Arial";
this.treemapCon trol1.FontSolid Color = System.Drawing. Color.Black;
this.treemapCon trol1.IsZoomabl e = false;
this.treemapCon trol1.Location = new System.Drawing. Point(88, 9);
this.treemapCon trol1.MaxColor = System.Drawing. Color.Green;
this.treemapCon trol1.MaxColorM etric = 100F;
this.treemapCon trol1.MinColor = System.Drawing. Color.Red;
this.treemapCon trol1.MinColorM etric = -100F;
this.treemapCon trol1.Name = "treemapControl 1";
this.treemapCon trol1.NodeLevel sWithText =
Microsoft.Resea rch.CommunityTe chnologies.Tree map.NodeLevelsW ithText.All;
this.treemapCon trol1.NodesXml = "<?xml version=\"1.0\"
encoding=\"utf-16\"?><Nodes xmlns:xsd=\"htt p://www.w3.org/2001/X" +
"MLSchema\" xmlns:xsi=\"htt p://www.w3.org/2001/XMLSchema-instance\"
EmptySizeMetric =" +
"\"0\" />";
this.treemapCon trol1.PaddingDe crementPerLevel Px = 1;
this.treemapCon trol1.PaddingPx = 5;
this.treemapCon trol1.PenWidthD ecrementPerLeve lPx = 1;
this.treemapCon trol1.PenWidthP x = 3;
this.treemapCon trol1.ShowToolT ips = true;
this.treemapCon trol1.Size = new System.Drawing. Size(656, 554);
this.treemapCon trol1.TabIndex = 0;
//
// build_button
//
this.build_butt on.Location = new System.Drawing. Point(16, 24);
this.build_butt on.Name = "build_butt on";
this.build_butt on.Size = new System.Drawing. Size(64, 24);
this.build_butt on.TabIndex = 1;
this.build_butt on.Text = "Build";
//
// Form1
//
this.AutoScaleB aseSize = new System.Drawing. Size(5, 15);
this.ClientSize = new System.Drawing. Size(760, 614);
this.Controls.A dd(this.build_b utton);
this.Controls.A dd(this.treemap Control1);
this.Name = "Form1";
this.Text = "Form1";
this.ResumeLayo ut(false);

}
#endregion

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run (new Form1());

}
void BuildTreemap(Tr eemapControl tmcMap)
{
Nodes oNodes, oChildNodes, oGrandChildNode s;
Node oNode, oChildNode, oGrandChildNode ;
oNodes = tmcMap.Nodes;

// Add a top-level node to the collection.
oNode = oNodes.Add("Eur ope", 25F, 100F);

// Add child nodes to this node.
oChildNodes = oNode.Nodes;
oChildNode = oChildNodes.Add ("England", 50F, 2.5F);
oChildNode = oChildNodes.Add ("Ireland", 50F, -34.5F);

// Add another top-level node.
oNode = oNodes.Add("Ame ricas", 50F, -40.1F);

// Add child nodes to the this new node.
oChildNodes = oNode.Nodes;
oChildNode = oChildNodes.Add ("Canada", 20F, 200F);
oChildNode = oChildNodes.Add ("USA", 100F, 0F);

// Add a child node to one of the children
oGrandChildNode s = oChildNode.Node s;
oGrandChildNode = oGrandChildNode s.Add("Californ ia", 60F, 0F);
oGrandChildNode = oGrandChildNode s.Add("Texas", 30F, 0F);

// Draw it
//tmcMap.Draw();

}
private void build_button_Cl ick(object sender, System.EventArg s e)
{
BuildTreemap(tr eemapControl1);
}
}
}
--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
May 4 '06 #1
0 2067

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8483
by: Mark Wayne | last post by:
Is is possible to use TreeMap in the javascript <SCRIPT> portion of HTML? If so, how? Thanks, mark
5
2060
by: John A Grandy | last post by:
do these mean the same thing ? Dim s As String ..... If s Is Nothing Then ..... If s = Nothing Then .....
6
1431
by: Shane Saunders | last post by:
I have a menu option that loads a form and displays infomation. if you go to main form and try to load something else from that same menu, it does a check to see if the form in exist and then reloads it has to or does messagebox. the problem i have is that i want to set the module instance varible to nothing when i exit the form that is being check. The code i am use is If frmWeatherMap Is Nothing Then
31
1792
by: Xero | last post by:
I have an array in my program. (Declared as letters(16, 16)). When I paused the program in debugging mode, I saw the following in the Autos window: letters |- (0, 0) | Nothing |- (0, 1) | Nothing
61
3126
by: academic | last post by:
When I declare a reference variable I initialize it to Nothing. Now I'm wondering if that best for String variables - is "" better? With Nothing I assume no memory is set aside nor GC'ed But with "" it is - correct? The system seems to handle a null the same as "".
1
1921
by: treeman | last post by:
I copied the example Compile is successful .net 2003 but i press button , nothing to show but the example has box show up, why ? where 's wrong?
0
2059
by: Thiero | last post by:
I am a studend in programming and I find it difficult to use treemap, can any one help me on how to use treemap. Specially the purpose is to use treemap and give a list of students firstname lastnname and matriculation after sorting them by last name. I did the sorting already using the collections framework, now my problem is how to use the treemap so that i would get the list.
16
1727
by: shapper | last post by:
Hello, I have a generic list as follows: Dim rows As New Generic.List(Of row) Now I have a row: Dim myRow As row I tried to check, further in my code, if the row is nothing: If myRow Is Nothing Then
3
2941
by: millz | last post by:
I am trying to create a tree map within a TreeMap. Any help would be great. goes a bit like this: public class ChessImpl implements CHESS { private Map<String, Integer> name; private int membernumber; private Map<String, Map<Integer, Holding>> stock;
0
8427
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8851
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.