Search found 49 matches

by Lenfors
Tue Sep 21, 2010 7:04 pm
Forum: VCL
Topic: Strange mouse events
Replies: 1
Views: 1360

Strange mouse events

Hello! Se my demo project below. I'm trying to handle the drag and drop functionality manually but I'm having problems with the events generated. If I click on a node the following events are created: Mouse down Click Mouse up Mouse down Select shape End drag Why do I get two Mouse down events? As i...
by Lenfors
Wed Aug 11, 2010 9:55 am
Forum: VCL
Topic: Exception when creating many nodes with icons
Replies: 12
Views: 6946

Re: Exception when creating many nodes with icons

Ok, I made a sample projekt below. Problem 1: If you run it and expand the root and then click a node you can see that it moves horizontally without showing any horizontal scrollbar! I want to disable this horizontal scrolling, I want it to be always left justified. Problem 2: If you now uncomment t...
by Lenfors
Mon Aug 09, 2010 9:04 pm
Forum: VCL
Topic: Exception when creating many nodes with icons
Replies: 12
Views: 6946

Re: Exception when creating many nodes with icons

Almost solved everything by myself now :-) Found out that I have to adjust the position with the Scrollbar offsets as below: DrawArea := Tree.Shape .AdjustedRectangle; DrawArea.Top := DrawArea.Top - UnitTree.VertScrollBar.Position; DrawArea.Bottom := DrawArea.Bottom - UnitTree.VertScrollBar.Position...
by Lenfors
Mon Aug 09, 2010 3:15 pm
Forum: VCL
Topic: Exception when creating many nodes with icons
Replies: 12
Views: 6946

Re: Exception when creating many nodes with icons

After some research I found some answers myself. 1: When i use the scrollbar all text and the "tree" is moving but my custom icons are not! Any idea hos to fix this. > This is still a big problem MAKING THE SOLUTION UNUSABLE! 2: It also seems like the ImageRect coordinates give the wrong position. I...
by Lenfors
Mon Aug 09, 2010 9:25 am
Forum: VCL
Topic: Exception when creating many nodes with icons
Replies: 12
Views: 6946

Re: Exception when creating many nodes with icons

Ok, thanks. It kind of works! But there are still problems. 1: When i use the scrollbar all text and the "tree" is moving but my custom icons are not! Any idea hos to fix this. 2: It also seems like the ImageRect coordinates give the wrong position. I can see part of the standard yellow "folder" ico...
by Lenfors
Mon Jul 12, 2010 10:55 am
Forum: VCL
Topic: Exception when creating many nodes with icons
Replies: 12
Views: 6946

Re: Exception when creating many nodes with icons

Hello! Now some of my customers have reached a point where this gets a problem! Is it something you can fix? As I mentioned before I think the problem is that the bitmap image is copied into each node instead if just using a ponter to the image. Totally I use just about 10 images byt they are duplic...
by Lenfors
Tue May 25, 2010 5:15 pm
Forum: VCL
Topic: Position text on node
Replies: 5
Views: 2439

Re: Position text on node

No, the HorizOffset and VertOffset only positions the text within the node! I want to increase the distance between two nodes in Y-direction. As default the icons added to the nodes are positioned exactly below each other!

Regards, Mikael
by Lenfors
Tue May 25, 2010 5:11 pm
Forum: VCL
Topic: Exception when creating many nodes with icons
Replies: 12
Views: 6946

Re: Exception when creating many nodes with icons

Tested the program memory usage.

With Count = 30 it takes 14124 Mb memory
With Count = 31 it takes 14663 Mb memory
With Count = 32 it craches!

Regards, Mikael
by Lenfors
Tue May 25, 2010 5:02 pm
Forum: VCL
Topic: Exception when creating many nodes with icons
Replies: 12
Views: 6946

Re: Exception when creating many nodes with icons

Yes, I realize it's a lot of nodes but still only a couple of thousand! Even if each node uses 1kB it's only 12 Mb! I have 4 Gb in the machine. In your example you have an "Add 50000 nodes" example! I think the problem is that the bitmap image is duplicated for each node, but it should really only b...
by Lenfors
Tue May 25, 2010 10:23 am
Forum: VCL
Topic: Switching imagelist at runtime
Replies: 1
Views: 1048

Switching imagelist at runtime

Hello! I have two ImageLists containing the same icons in 16*16 and 32*32. Now I want to change all my icons in my TTree. I tried the code below, but there is no change to the icons! How Do I update them during runtime? Regards, Mikael Procedure TForm4.B_BigIconClick(Sender: TObject); Begin Tree.Ima...
by Lenfors
Tue May 25, 2010 9:59 am
Forum: VCL
Topic: Exception when creating many nodes with icons
Replies: 12
Views: 6946

Exception when creating many nodes with icons

Hello! Se code below. When running with Quantity set to 40 or below everything works fine. But when I increase the number of nodes and set Quantity to 50 or higher the program chraches with error "Access denied". The ImageList contains 3 icons 32*32 in size. Any ideas? Regards, Mikael Procedure TFor...
by Lenfors
Tue May 25, 2010 9:18 am
Forum: VCL
Topic: Position text on node
Replies: 5
Views: 2439

Re: Position text on node

I use the following code to create then nodes: Node := Tree.AddRootObject('Group ' + intToStr(I), TNodeData.Create); Node.AutoSize := True; Node.Height := 34; Node.Font.Size := 12; Node.Border.Hide; Node.ImageListIndex := 0; After some testing I found that it's the "Node.Height := 34;" command that ...
by Lenfors
Tue May 18, 2010 2:43 pm
Forum: VCL
Topic: Position text on node
Replies: 5
Views: 2439

Position text on node

When I assign icons (32*32) to my nodes the text is not repositioned at the right of the icon, its written right over it!? How can I position the text?

Regards, Mikael
by Lenfors
Wed Jan 27, 2010 2:16 pm
Forum: VCL
Topic: Add extra ChartValueList on TLineSeries
Replies: 1
Views: 622

Add extra ChartValueList on TLineSeries

Hello! I have several TLineSeries containing lots of data. Now I would like to filter the "visible" data y-serie but still keep my original values. Of course I could have duplicate TLineSeries one containing the original data (invisible) and another TLineSeries containing the filtered data, or a sep...
by Lenfors
Tue Dec 01, 2009 12:18 pm
Forum: VCL
Topic: Get Y value for current mouse position
Replies: 1
Views: 640

Get Y value for current mouse position

Hello!

I have a TLineSeries. In the CharMouseMove event I want to get the current Series Y value for the current mouse horizontal position (X).

How Do I do this?

Tried XScreenToValue and YScreenToValue but they return analog values and my Series only contains the values 0 and 1.

Regards, Mikael