Click here to Skip to main content
15,923,789 members
Home / Discussions / C#
   

C#

 
GeneralMaking listView.labelEdit editable on one click Pin
youusuf5-Dec-04 8:36
youusuf5-Dec-04 8:36 
GeneralRe: Making listView.labelEdit editable on one click Pin
Daniel Turini5-Dec-04 20:10
Daniel Turini5-Dec-04 20:10 
GeneralGenerating tabs dynamically Pin
thepersonof5-Dec-04 3:22
thepersonof5-Dec-04 3:22 
GeneralRe: Generating tabs dynamically Pin
Nick Parker5-Dec-04 4:26
protectorNick Parker5-Dec-04 4:26 
GeneralRe: Generating tabs dynamically Pin
thepersonof5-Dec-04 4:45
thepersonof5-Dec-04 4:45 
GeneralRe: Generating tabs dynamically Pin
Nick Parker5-Dec-04 5:06
protectorNick Parker5-Dec-04 5:06 
GeneralRe: Generating tabs dynamically Pin
Anonymous5-Dec-04 8:26
Anonymous5-Dec-04 8:26 
GeneralDrawing a Family Tree Pin
pjholliday5-Dec-04 1:47
pjholliday5-Dec-04 1:47 
I am trying to draw a Family tree onto a panel by adding several custom panels that contain the data about each person in the tree. I have all the panels displaying but my formula for working out where to place each custom panel is placing them incorrectly.

This is my formula.

child is the custom panel one generation back in the tree and the index is set according to its vertical position in the generation (i.e the one nearest the top of the panel is 1 and the next lowest 2 and then next lowest 3 etc..)

generation is the generation the the animal belongs to (1 being the initial person, 2 being the parents, 3 the grandparens)

pw = the custom panel width, hg = the gap between generations, pd = the custom panel height, paneldepth = the main panel height

I want the tree to draw left to right.

The x co-ordinate works fine its the y co-ordinate that doesnt work, it causes earlier generation to be too close together.

// Set Panel Location
int x = child.Location.X + pw + hg;
int y = ((paneldepth / (generation + 1)) * ((2 * child.Index) - 1)) - (pd / 2);
parentpanel.Location = new Point(x, y);

Can anyone suggest a formula that might work?
Generalunicode problem in INI Pin
ye win zaw5-Dec-04 1:17
ye win zaw5-Dec-04 1:17 
GeneralRe: unicode problem in INI Pin
Nick Parker5-Dec-04 4:29
protectorNick Parker5-Dec-04 4:29 
GeneralRe: unicode problem in INI Pin
Christian Pedersen5-Dec-04 13:34
Christian Pedersen5-Dec-04 13:34 
GeneralI have a network application Pin
Mohammed Aijaz Mohiuddin5-Dec-04 1:04
Mohammed Aijaz Mohiuddin5-Dec-04 1:04 
GeneralSyntax hightlighting. Pin
Marlun5-Dec-04 0:51
Marlun5-Dec-04 0:51 
GeneralRe: Syntax hightlighting. Pin
Nick Parker5-Dec-04 4:30
protectorNick Parker5-Dec-04 4:30 
GeneralRe: Syntax hightlighting. Pin
leppie5-Dec-04 7:36
leppie5-Dec-04 7:36 
QuestionHow to create a shortcut key for a control in C#? Pin
momer5-Dec-04 0:30
momer5-Dec-04 0:30 
AnswerRe: How to create a shortcut key for a control in C#? Pin
Kir Birger5-Dec-04 5:46
Kir Birger5-Dec-04 5:46 
AnswerRe: How to create a shortcut key for a control in C#? Pin
Nick Parker5-Dec-04 6:52
protectorNick Parker5-Dec-04 6:52 
Generalfile.Position problem Pin
balkang4-Dec-04 23:04
balkang4-Dec-04 23:04 
GeneralRe: file.Position problem Pin
Robin Panther5-Dec-04 1:56
Robin Panther5-Dec-04 1:56 
Generalproperty grid validation Pin
Sundar Venugopal4-Dec-04 18:57
Sundar Venugopal4-Dec-04 18:57 
Generaltrapping keystrokes Pin
Anonymous4-Dec-04 18:18
Anonymous4-Dec-04 18:18 
GeneralRe: trapping keystrokes Pin
Kir Birger5-Dec-04 5:51
Kir Birger5-Dec-04 5:51 
GeneralRe: trapping keystrokes Pin
Anonymous5-Dec-04 8:03
Anonymous5-Dec-04 8:03 
GeneralRe: trapping keystrokes Pin
Kir Birger5-Dec-04 8:09
Kir Birger5-Dec-04 8:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.