How to update ListView.DragIcon so ListView control is shown as not allowed to drop on a control which is not the intended Drop target?

Hello..

Using Powerbuilder 7.0

I'm dragging a ListView control... I select the DragIcon for the ListView 
based on the PictureIndex property of the selected item on the same ListView 
control, and in the LargePictureName[] list. The intended target for 
dropping that ListView control is a TreeView control... while moving within 
the TreeView control, everything is cool... I also coded the dragdrop 
event... works nice.

But if the user drags the ListView control into other controls within the 
Window (I have several DataWindow controls there) I would like to change the 
Dragged Icon to the one which means 'not allowed here' so the user knows 
(s)he can't drop the control there. How can I implement this?

Thanks..!


0
Alex
6/19/2009 6:16:20 PM
sybase.powerbuilder.general 62418 articles. 18 followers. Follow

3 Replies
802 Views

Similar Articles

[PageSpeed] 29

The DragEnter and DragLeave events should help. You can also declare a 
"mouseover" event - point to pbm_nchittest.

-- 
Report Bugs: http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests: 
http://my.isug.com/cgi-bin/1/c/submit_enhancement


"Alex Castillo" <a@m.com> wrote in message 
news:4a3bd5f4@forums-3-dub.sybase.com...
> Hello..
>
> Using Powerbuilder 7.0
>
> I'm dragging a ListView control... I select the DragIcon for the ListView 
> based on the PictureIndex property of the selected item on the same 
> ListView control, and in the LargePictureName[] list. The intended target 
> for dropping that ListView control is a TreeView control... while moving 
> within the TreeView control, everything is cool... I also coded the 
> dragdrop event... works nice.
>
> But if the user drags the ListView control into other controls within the 
> Window (I have several DataWindow controls there) I would like to change 
> the Dragged Icon to the one which means 'not allowed here' so the user 
> knows (s)he can't drop the control there. How can I implement this?
>
> Thanks..!
>
> 


0
Jerry
6/19/2009 6:57:09 PM
So, the idea is

One:
Code something on the source control's BeginDrag event to set the source 
control's.DragIcon

Two:
Code something on the source control's DragLeaveEvent so I save the current 
source control's.DragIcon at some instance variable and then set the source 
control's.DragIcon to the 'Not Allowed' icon.

Three:
Code something on the intended drop target control's DragEnterEvent so I can 
assign the source control's.DragIcon the value previously saved on the 
instance variable.

Four:
Code something on the intended drop target control's DragLeaveEvent so I 
save the current source control's.DragIcon at the same instance variable and 
then set the source control's.DragIcon to the 'Not Allowed' icon.

Five:
Code something on the source control's DragEnterEvent so I can assign the 
source control's.DragIcon the value previously saved on the instance 
variable.

I made it that way, I'm just not sure if that's the most efficient way to do 
it.

Any sugestion?

Thanks..!
"Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message 
news:4a3bdf85@forums-3-dub.sybase.com...
> The DragEnter and DragLeave events should help. You can also declare a 
> "mouseover" event - point to pbm_nchittest.
>
> -- 
> Report Bugs: http://case-express.sybase.com/cx/welcome.do
> Product Enhancement Requests: 
> http://my.isug.com/cgi-bin/1/c/submit_enhancement
>
>
> "Alex Castillo" <a@m.com> wrote in message 
> news:4a3bd5f4@forums-3-dub.sybase.com...
>> Hello..
>>
>> Using Powerbuilder 7.0
>>
>> I'm dragging a ListView control... I select the DragIcon for the ListView 
>> based on the PictureIndex property of the selected item on the same 
>> ListView control, and in the LargePictureName[] list. The intended target 
>> for dropping that ListView control is a TreeView control... while moving 
>> within the TreeView control, everything is cool... I also coded the 
>> dragdrop event... works nice.
>>
>> But if the user drags the ListView control into other controls within the 
>> Window (I have several DataWindow controls there) I would like to change 
>> the Dragged Icon to the one which means 'not allowed here' so the user 
>> knows (s)he can't drop the control there. How can I implement this?
>>
>> Thanks..!
>>
>>
>
> 


0
Alex
6/19/2009 8:55:03 PM
That would be about right. If you want to control the icon you have to cover 
all the places the coursor could go.

-- 
Report Bugs: http://case-express.sybase.com/cx/welcome.do
Product Enhancement Requests: 
http://my.isug.com/cgi-bin/1/c/submit_enhancement


"Alex Castillo" <a@m.com> wrote in message 
news:4a3bfbd3@forums-3-dub.sybase.com...
> So, the idea is
>
> One:
> Code something on the source control's BeginDrag event to set the source 
> control's.DragIcon
>
> Two:
> Code something on the source control's DragLeaveEvent so I save the 
> current source control's.DragIcon at some instance variable and then set 
> the source control's.DragIcon to the 'Not Allowed' icon.
>
> Three:
> Code something on the intended drop target control's DragEnterEvent so I 
> can assign the source control's.DragIcon the value previously saved on the 
> instance variable.
>
> Four:
> Code something on the intended drop target control's DragLeaveEvent so I 
> save the current source control's.DragIcon at the same instance variable 
> and then set the source control's.DragIcon to the 'Not Allowed' icon.
>
> Five:
> Code something on the source control's DragEnterEvent so I can assign the 
> source control's.DragIcon the value previously saved on the instance 
> variable.
>
> I made it that way, I'm just not sure if that's the most efficient way to 
> do it.
>
> Any sugestion?
>
> Thanks..!
> "Jerry Siegel [TeamSybase]" <jNOsSPAMsiegel@yahoo!.com> wrote in message 
> news:4a3bdf85@forums-3-dub.sybase.com...
>> The DragEnter and DragLeave events should help. You can also declare a 
>> "mouseover" event - point to pbm_nchittest.
>>
>> -- 
>> Report Bugs: http://case-express.sybase.com/cx/welcome.do
>> Product Enhancement Requests: 
>> http://my.isug.com/cgi-bin/1/c/submit_enhancement
>>
>>
>> "Alex Castillo" <a@m.com> wrote in message 
>> news:4a3bd5f4@forums-3-dub.sybase.com...
>>> Hello..
>>>
>>> Using Powerbuilder 7.0
>>>
>>> I'm dragging a ListView control... I select the DragIcon for the 
>>> ListView based on the PictureIndex property of the selected item on the 
>>> same ListView control, and in the LargePictureName[] list. The intended 
>>> target for dropping that ListView control is a TreeView control... while 
>>> moving within the TreeView control, everything is cool... I also coded 
>>> the dragdrop event... works nice.
>>>
>>> But if the user drags the ListView control into other controls within 
>>> the Window (I have several DataWindow controls there) I would like to 
>>> change the Dragged Icon to the one which means 'not allowed here' so the 
>>> user knows (s)he can't drop the control there. How can I implement this?
>>>
>>> Thanks..!
>>>
>>>
>>
>>
>
> 


0
Jerry
6/20/2009 2:22:18 PM
Reply:

Similar Artilces:

Cascading Drop Down (Disable the target drop control)
I have a page with a cascading dropdown control extender and the related dropdown component.  I want to be able to have compete control over the enabled property of the dropdown list, does anyone know what i can modify in the extender code to allow this.  I have tried setting the enabled property of the drop down control to false in the Page_Load but when the page renders the control is enabled. Has anyone else came accross this problem ? Any help would be greatly appreciated. Stuart  Hi Stuart,You can add a bool property into the extender whose value is determined by t...

Custom control
Hi,I would like to create a composite control, which will only allow user to drop control at particular area (contents).How could I do so?Thank you Hi,chanmy9 Do you want to create the function in design time or run time?Gary yang - MSFTMicrosoft Online Community SupportPlease remember to mark the replies as answers if they help and unmark them if they provide no help. Hi,Design time.Thank you Hi, If it is design time, then you can take a master page and content page and Place the custom control on the content page where it have the chance to drop the controls on a specified Area...

how to allow users to drag drop controls (textbox, drop down)
 We have a situation where the user needs to choose the layout of the page. They want to drag drop text boxes and other controls onto the page. We need to provide a toolbox similar to visual studio, from where they can drag drop controls. Also when they have created a page and saved it, the whole set of controls + page should also be available on the left side drag/drop menu for them to use thereafter. Anyone can help Thanks,Balaji Balaji Look for AjaxControlToolkit from http://www.asp.net/ajax ...

dynamically generating one drop down control on select event of another drop down control
Hi Anyone can help me how to add items in one drop down control on select event of another drop down control. Please this is urgent. Any examplry piece of code or any guidence :)   Hi, This seems too simple if I am not getting it wrong: protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { DropDownList2.Items.Add("a"); } Let me know if this works. Thanks, VivekSocial Networking Platform in ASP.NET || Join now: CodeASP.NET Community Please mark the most helpful reply/replies as "Answer". Thanks alot Vivek for help .... actually that was...

ListView control and User Controls
I have a user control, which has a public property called ITEMID.  I am using it inside a ListView control (3.5), and trying to get the property via data binding.  However, I am not getting the value back. Here's the code: <ItemTemplate><uc1:item ID="Item1" runat="server" ItemID='<%# Eval("PropertyID") %>' /></ItemTemplate> Can't figure out where I'm going wrong.  The data is being returned properly, but the ItemID property is always zero. Any help is greatly appreciated.   Try using this ins...

controls inside a listView control
 I'm using a listview control.Inside the template I have a checkbox.Everything is inside an updatepanel. When a checkbox is checked or unchecked I want to trigger my AsyncPostBack.It works as it should when I have one manually added checkbox with no listView. However when I use a listView it will not run my event at all. If I check the checkbox it goes about 5 seconds and it unchecks again, no postback made.Here's the code I use... protected void cbCheck_CheckedChanged(object sender, EventArgs e)    {        CheckBox cb = (C...

PFC Listview control Drag/Drop Multi-Select Bug?
Hello Everyone, I am converting a PFC PB 6.0 application to PFC PB 7.0. I am having problems with the PFC listview control u_lvs. When a user clicks and begins to drag the program freezes. If I hold the right mouse and click and drag it works on the first try, the second time it freezes.(not consistent) I know there have been some new events and properties for the listview control. Is there a bug in this version or am I doing something wrong. This program work perfectly in version 6.0 of PB and PFC. Im am using version 7.01. Has anyone else had problems with drag & drop in the ...

accessing controls dropped in Loginview control
dear all, i am using ASP.NET Loginview control, my problem is that i cannot access controls that i've dropped (like gridviews and buttons) in the Loginview control from my aspx.cs page. is there any workaround?thank you all,   Try LoginView.FindControl() method.Welcome to my SQL/ASPNET forum for Chinese http://51up.org/bbs/forumdisplay.php?fid=38 this does only get the data from the controls within the LoginView, and doesn't set it. Try something like:TextBox TB1= new TextBox(); TB1.ID = "SourceTextBox"; LoginView1.Controls.Add(TB1); TextBox TargetText...

Creating a control that other controls can be dropped in
How would one go about creating a control that other developers can drop their controls in, like how a Panel works? Are there some links available? With .net 1.x there's 2 basic mechanisms. 1) Do what Panel does, and use the ReadWriteControlDesigner. This causes your control to support drag-drop exactly like panel, but also like panel, does not let you show any html around the area. Your control will always only look like a panel. 2) Templates. Make the area that will be editable be an ITemplate property. You can use this templated control designer I wrote to quickly set up the desi...

ListView control with multiple select command controls
 Hi there, I have a listview control, on which I have two buttons 1) Wesite 2)Email Me. Note the listview only has the Item and Layout Templates as I will not be editing or inserting. I have assigned both the controls the CommandName="select" so that they both fire the SelectedIndexChanged event. There I can access the website address and email address held in datakeys. In the listviews SelectedIndexChanged event I need to work out which control fired the event. Ie if it was the website button then I will redirect the user to the website... Code in VB please. ...

Error When Using a DropDownList Control in a ListView Control
VWD 2008 Express.  Visual Basic. I have placed a ListView Control on my page that is bound to a SQLDataSource.  I have placed a dropdownlist control in one of the fields (columns) in the edit, update, and insert templates.  This dropdownlist control is bound to another SQLDataSource.  The dropdownlist control works fine in the edit and update templates.  However, when I place the same dropdownlist in the insert template, I receive the following error (while in the VWD debug mode).  Why would it work in the edit and update templates and not in the insert templat...

Dynamically Updating ListView Control
I'm working with a list ListView control to create a form with a list of questions. Each question has a yes/no answer. I would like to be able to dynamically insert a new question based on the answer to an existing question. For example, consider a form with 5 yes/no questions. If the user selects yes to question 4, I would like to dynamically insert two new questions, perhaps 4a and 4b.My code looks like this:...            <fieldset>                <legend>Health History...

Drop down control that allows editing
Hi Everyone - I am looking for a control that will allow the user the ability to enter thier own text into the field - or select one of the items from the list does anyone know where such a component exists??? thanks tony This is a good start: http://www.metabuilders.com/Tools/DynamicListBox.aspxThanks,Teemu KeiskiFinland, EU...

How to connect a DataPager control to a ListView control which is inside a Webusercontrol
Hello, I've got a Listview control inside a Webusercontrol but because of layout reasons, I need to put the Datapager control somewhere else in the page.My question is now, how can I connect the Datapager to the Listview control? How and when do I have to fill the "PagedControlID" property of the DataPager?  Regards,TripleTwenty Hi tripletwenty , By default , we can not do this. Because you need to set datapager's pagedcontrolid to one special control which implements IPageableItemContainer interface. But the user control did not. If you really want to do that , ...

Web resources about - How to update ListView.DragIcon so ListView control is shown as not allowed to drop on a control which is not the intended Drop target? - sybase.powerbuilder.general

Optimizing ListView item rendering
For many Windows Store apps written in JavaScript that work with collections, cooperating well with the WinJS ListView control is essential for ...

Improvements to the ListView control in WinJS 2.0
We’re proud to describe the improvements we have made to the ListView control for the Windows Library for JavaScript (WinJS) 2.0. Here we’ll ...

Android ListView – Fixing Missing/Blank Dividers
A post with code in it. Because it’s been a long time since the last one. If you work with ListViews in Android, as all Android developers will ...

Under the Hood: Rebuilding Facebook for Android - Facebook
Facebook Engineering hat eine Notiz mit dem Titel Under the Hood: Rebuilding Facebook for Android geschrieben. Du kannst den vollständigen Text ...

CNW Group
... Services Beyond the Wire About CNW my CNW CNW Access CNW Directories Financials Webcasts Events my CNW All News Releases Advanced Search Listview ...

BitSpirit ChangeLog - BitSpirit
[Dec 29, 2010] v3.6.0.550 Stable Improved: Reduced memory usage while IPFilter.dat is enabled; Fixed: problems while running on Linux & Wine; ...

TransMac Help
TransMac Help

Aid Armenia
English HOME / CURRENT PROJECTS / PAST PROJECTS / ABOUT US Current Projects GALLERY - LISTVIEW Projects Amount Raised Amount Needed Appeal Target ...

TransMac Help
TransMac Help

AutoIt Forums
The AutoIt community forums.

Resources last updated: 1/21/2016 1:59:11 PM