Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Cursor disappears, when adding box to Flowchart. (Read 6943 times)
Dirk Wölfel
Guest


Cursor disappears, when adding box to Flowchart.
Aug 1st, 2006 at 12:53pm
Print Post  
Hello,

I´m using the Add-command, to create an new box on the flowchart-control. I do so, because so I could se a prototype of the box to create the new one from.

Code
Select All
Me.FlowChart1.Add(New Box(myPrototype), True) 



,where myPrototype is of type box and defined at the start of the program (to use as a prototype and to fill a listbox for Drag/Drop new element - see other thread).

When I use the command, the new box appears but the mousecursor disappears until I move the mouse a bit. Is this a bug? How can avoid these behavior?

Thanks,
Dirk
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Cursor disappears, when adding box
Reply #1 - Aug 1st, 2006 at 1:04pm
Print Post  
Is that box created from a Drop event handler? I don't know why the cursor would disappear, try setting FC.CurrentCursor = Cursors.Arrow after creating the box.

- glavcho
  
Back to top
 
IP Logged
 
Dirk Woelfel
Guest


Re: Cursor disappears, when adding box to Flowchar
Reply #2 - Aug 1st, 2006 at 1:15pm
Print Post  
Thanks for trying to help me.

Yes, the box is created bey a drop event handler: I have a listbox, with all possible box-types (similar to FlowCharter-example, but I use real box-prototypes - not just the shape-templates in the hidden second flowchart-control).

Setting the CurrentCursor does not help. Just moving the mouse a short distance.

If I drop a new box on an existing box the cursor does not disappear - only if I drop it onto a free area of the control.

Thanks,
Dirk
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Cursor disappears, when adding box to Flowchar
Reply #3 - Aug 1st, 2006 at 1:52pm
Print Post  
Could you email me your project to glavcho@mindfusion.org, if it's not a secret ...
  
Back to top
 
IP Logged
 
Dirk Woelfel
YaBB Newbies
*
Offline



Posts: 17
Joined: Jun 26th, 2006
Re: Cursor disappears, when adding box to Flowchar
Reply #4 - Aug 1st, 2006 at 3:44pm
Print Post  
Hello,

I tried to send you the project by mail, but it failed due to the size of the attachment. I will break it down and try it again tomorrow.

Kind regards,

Dirk
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Cursor disappears, when adding box to Flowchar
Reply #5 - Aug 2nd, 2006 at 5:58am
Print Post  
I've got it, will take a look in awhile.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Cursor disappears, when adding box to Flowchar
Reply #6 - Aug 2nd, 2006 at 7:02am
Print Post  
Funny thing, the cursor does not disappear when running your exe on my system. What OS do you use there?

I could not get to compile the project myself because of a missing "WeifenLuo.WinFormsUI.DockContent".
  
Back to top
 
IP Logged
 
Dirk Woelfel
YaBB Newbies
*
Offline



Posts: 17
Joined: Jun 26th, 2006
Re: Cursor disappears, when adding box to Flowchar
Reply #7 - Aug 2nd, 2006 at 7:58am
Print Post  
Hello,

my system runs on Windows 2000. I think you could compile my project, when you use the WeifenLuo.WinFormsUI.Docking.dll in ..\bin\debug.

Thanks,

Dirk
  
Back to top
 
IP Logged
 
Dirk Woelfel
YaBB Newbies
*
Offline



Posts: 17
Joined: Jun 26th, 2006
Re: Cursor disappears, when adding box to Flowchar
Reply #8 - Aug 2nd, 2006 at 9:26am
Print Post  
Hello Glavcho,

I tested my demo-project on different systems at our concern.

My own developer system seem to be the only one with the problem.

So I hope it will not appear on any other system.

Maybe you could have a look at the method I build up the listview and Drag/Drop the elements - is this the best way or do you know something to improve?

Thanks for help,

Dirk

  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Cursor disappears, when adding box to Flowchar
Reply #9 - Aug 2nd, 2006 at 9:56am
Print Post  
Hello Dirk,

It looks pretty good, I couldn't think up a better way to do that myself  Grin

In the List_DrawItem method you could use box.Draw to draw the items instead of creating temp bitmaps. We have recently made the Draw method public, but haven't updated the Flowcharter sample to use it.

- glavcho
  
Back to top
 
IP Logged
 
Dirk Woelfel
YaBB Newbies
*
Offline



Posts: 17
Joined: Jun 26th, 2006
Re: Cursor disappears, when adding box to Flowchar
Reply #10 - Aug 2nd, 2006 at 10:22am
Print Post  
??? ... so you may have a small example for me...?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Cursor disappears, when adding box to Flowchar
Reply #11 - Aug 2nd, 2006 at 10:43am
Print Post  
e.g. remove the three lines that refer to 'bmp' and add this:

Dim gs As System.Drawing.Drawing2D.GraphicsState = e.Graphics.Save()

Dim box As Box = NodesColl(e.Index).Box
e.Graphics.TranslateTransform(rci.Left - box.BoundingRect.Left, rci.Top - box.BoundingRect.Top)
box.Draw(e.Graphics, False)

e.Graphics.Restore(gs)
  
Back to top
 
IP Logged
 
Dirk Woelfel
YaBB Newbies
*
Offline



Posts: 17
Joined: Jun 26th, 2006
Re: Cursor disappears, when adding box to Flowchar
Reply #12 - Aug 2nd, 2006 at 1:18pm
Print Post  
Hello,

thank you for the example.

It works, but the appearance is not as nice as using the bitmap version. Using the shadow = true just results in gray symbols.

I send some screenshoots to your email.

Dirk
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Cursor disappears, when adding box to Flowchar
Reply #13 - Aug 2nd, 2006 at 1:23pm
Print Post  
I guess the gray symbols are actually the shadows. That parameter specifies whether to draw the box' shadow or the box itself, so you must call Draw twice if you want to have both the boxes and their shadows drawn.
  
Back to top
 
IP Logged
 
Dirk Woelfel
YaBB Newbies
*
Offline



Posts: 17
Joined: Jun 26th, 2006
Re: Cursor disappears, when adding box to Flowchar
Reply #14 - Aug 3rd, 2006 at 5:59am
Print Post  
Thanks,

calling the method twice works fine.

But I think the optical appearance is better, when using the bitmap-version: the edges of the shape seem to be more smooth...

Dirk
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint