NSOutlineView spring loading exits over NSImageView but not NSButton - nsoutlineview

I have an NSOutlineView subclass that implements the NSSpringLoadingDestination.
The outline view is populated with NSTableCellViews. Each table cell view has an NSTextField and NSImageView. It looks just like the name column in the Finder window: icon and text.
When I drag a row over the text field in another row everything works fine. When the cursor goes over the NSImageView, however, the spring loading exits.
The outline view also loses the highlight for that row.
If I replace the image view with an NSButton containing the image, the spring loading does not exit. And the outline view maintains the highlight.
Can anyone tell me why an NSControl does not interrupt the spring loading but an NSImageView does?
I have tried overriding some different NSView methods but I can’t get the image view to behave like the button.
Thanks.

Even when an image view is uneditable it apparently still handles drag & drop. To fix this call the image view's unregisterDraggedTypes method.

Related

Winform - multi line Textbox changes scroll position on refresh

I have a winform application that has a textbox, multiline, readonly where I display a kind of log that is refreshed each second. The text box can have more than 100 lines of text.
On each refresh, if the user scroll and selection are lost.
I need a way to allow to the user to keep the scroll and selected text.
I tried to replace only the line that changes - didn't work (using Lines property)
I tried to save the selection before update and re-select it after - didn't work.
I tried to use RichTextBox instead - didn't work.
Anyone did something like this before? Is any library (custom control) I can use instead?
Thank you.

Finding empty label in Windows form

I am new to Windows Form application and trying to build a small application.
I had dragged and dropped a label on the main form.
Then I deleted its text property to empty string basically hiding the label.
Now I would like to move this label to some other location on the form but unable to do so because I cannot find it.
I checked the designer file and its there.
But I cannot find it in the form so that I can grab it and move to a different location.
Please help.
Thanks
Use Document Outline. Look at the following images.
That happens to me several times, and a few weeks ago I found a way to get the empty label like this:
On the tab "Properties" just click on the arrow to show all controls and click on the label you want, this will automatically select the label on your form..

Access database - Form

Simply I would like one form to open on top of another (automatically).I've searched the net and found nothing that helps or works.
In some more details - When opening the database, the system automatically loads up "Form1", which looks very nice in the middle of not only my screen, but others as well, but I would like to hide all the visible sign's of access. Yes I can hide the tool bars etc, but what I was looking for was to create a form "Background", load that automatically and then load up "Form1" on top.
For some reason I can't seem to get form1 to load so it's visible. Yes it loads, but under the background form. I've tried all settings of popup, modal, visible, onload, onopen. I've set the database to open minimized (but that does not hide the fact that it is access).
Please can anyone come up with a solution.
Just to clear things up:
You want a hidden form (background) that loads another form that is visible?
All this needs to be done in a windows form application (c#)?
Is this what you want?
You could try VBA.
This is how a form is loaded.
Private Sub Form1_Load()
OpenForm(FormName, View, FilterName, WhereCondition, DataMode, WindowMode, OpenArgs)
End Sub
I don't have access to ms-Access now, but I believe this should work.
These are parameters you should/can fill in:
FormName, View, FilterName, WhereCondition, DataMode, WindowMode & OpenArgs
More info: https://msdn.microsoft.com/en-us/library/office/ff820845.aspx

imagelist images not available in child form .net winform

I have a dll that contains a form that is being inherited by other forms. The parent form has an imagelist with several images in it and two of these are being used in toolbar buttons. It has been working for a long time but I had to add a toolbar button and an image to go with it.
The new button with the new image displays in the designer correctly in the base form, but in an existing child form, the button doesn't display in the toolbar in the designer (although it shows up at runtime with no image). In the child form, the imagelist is present with all the original images, but the new image that I added to the base form does not appear in it.
I have tried several different icons with the same result. Interestingly when I point the new tb button to one of the images that has always existed, everything is fine in the child. It just won't handle any of the new images (I've tried icons & bitmaps). I would try to delete the toolbar and imagelist and re-create it but unfortunately I don't know where the existing images are located to be able to add them back to the new imagelist.
(VS 2010, VB.NET - but C# answers are most welcome!)
I have the same problem. My parent form have an image list wich I use to present my own control box (min, max, close). All the child forms inherit from this form and everything is ok if I don't change the elements of the list. But when I add an element or change the Image index of the control buttons, this is not reflected in the child forms. Sadly I haven't fixed it yet but what I did is:
Declare the Image list as public in the designer of the parent form
Determine the forms that don't reflect the desired change
Set Manually the desired change by adding the image to the inherited IMageLIst and changing the image index in all and every form with the bug
This is not what I intended to do by designing a parent form, but it works.

In my Windows Phone app,I want to turn my current page unable in gray and show a textbox in foreground

Like the title said,how may i turn the grid(or page) and the components in it into background gray and unable and show a new component in foreground.
It's a common effect in the web page,but i cannot do that with a xaml.
Please answer in detail better with sample code if you do.Thanks in advance.
Here's an example of using a Popup to display a UserControl when a Page is navigated to. The OnNavigatedTo function creates a popup, binds a Click event to the UserControl, and then shows the UserControl over the entire page. If the correct password is entered, ("password" in the example) the control disappears. You'll need to modify it for your own requirements, but it should definitely get you started.
https://skydrive.live.com/redir.aspx?cid=ef08824b672fb5d8&resid=EF08824B672FB5D8!343
You'll want to use the VisualStateManager and create some animation transitions to switch between the old and new components. I won't paste the code here for brevity, but if you check out:
http://visualstudiomagazine.com/articles/2011/07/22/wcmob_visual-states.aspx
You'll see a simple example of switching between two UI components on a single page within a Windows Phone 7 PhoneApplicationPage. In your scenario, you'd use this paradigm to create 2 animation storyboards, one for showing an overlay control and one for settings the 'disabled' property on the main grid.

Resources