Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Down

Drag and Drop Component Find similar branches


avr555   (2001-12-17 19:54) [0]

I have this question:
I want to make a component that could be “dragged” in shape.
As such component decided to use VirtualTreeView
I use three events for dragging: OnMouseDown, OnMouseMove, OnMouseUp.

When I used CheckListBox as a draggable component, in order for the component not to fail, I called the SetCapture (self.Handle) function and everything worked.
And when switching to VirtualTreeView after calling SetCapture (self.Handle), the component stops moving. If you do not call SetCapture (self.Handle), then everything works, only the component is "dropped" from the pointer when you drag.

What to do?



DK   (2001-12-19 02:16) [1]

Try inserting into the OnMouseDown handler:
var Control: TControl; begin try Control: = Sender as TControl; ReleaseCapture; Control.Perform (WM_SYSCOMMAND, $ F012, 0); finally end;
end;



Pages: 1 whole branch

Forum: "Main";
Current archive: 2002.01.08;
Download: [xml.tar.bz2];

Top









Memory: 0.55 MB
Time: 0.025 c
1-22151
What a
2001-12-20 14:06
2002.01.08
MDI -ClientForm


3-21918
SVS
2001-12-04 13:11
2002.01.08
filling in OleContainer from BlobField


14-22413
RUS
2001-11-11 21:27
2002.01.08
CD-RW


1-22172
ASTARD
2001-12-19 22:12
2002.01.08
People help pliz ???


6-22308
Igor
2001-10-14 09:44
2002.01.08
Data exchange between client and server in Delphi





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian Japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Español swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish