|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Drag & drop in a grid....
Hi
I'm trying to do an application for a bowlingalley (booking) with lanes and timezones. I use a DrawGrid where I make selections and then store them in a database. It's works fine but I have problems when I want to move the booking. I want to make an selection and then drag and drop it on another place(time)... Is it diffecult to do? Ake |
|
#2
|
||||
|
||||
|
If I were you, I would do something like this:
When the user double clicks on a cell a form pops out and he can reschedule / move the information to another "time". After that you can save the new info and refresh the dataset. If you want to use drag & drop in a grid you should check the delphi help for the event OnDragDrop. Code:
Delphi Help Example:
This code comes from an application that contains a list box and three labels:
procedure TForm1.ListBox1DragDrop(Sender, Source: TObject; X, Y: Integer);
begin
if (Sender is TListBox) and (Source is TLabel) then
begin
with Sender as TListBox do
begin
Font := (Source as TLabel).Font;
Color := (Source as TLabel).Color;
end;
end;
end;
You can also change the mouse look while doing that ![]() Hope this helps you, Silver |
|
#3
|
||||
|
||||
|
Check this article too:
http://delphi.about.com/library/wee...42605a.htm?nl=1
__________________
If i've been helpful, please add to my reputation. My unfinished site: http://www.dever.ro |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Delphi Programming > Drag & drop in a grid.... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|