Problem with toolstrip renderer in VB.net - vb.net

I'm using the toolstrip renderer in vb.net, found the source over at:
http://63.236.73.220/showthread.php?t=539578
Now, it works great however the style doesn't seem to stick when I click a button on the toolbar. I use a toolstrip sort of like tabs, and what I'd like is if a toolstrip menu is clicked the style stays so I can visually see what tab is clicked.
Can someone help me out with that?

I figured out the issue... Turns out the default toolstrip renderer supports the clicked item state, so I had to turn on the "checkonclick" to true and then when the the toolstrip button is clicked it shows the selected state, then in the code on the click event I did a loop to uncheck all other buttons in the toolstrip so now it functions exactly like a tab interface using the fancy toolstrip renderer :)

Related

Button control as ListView DataTemplate container wrt Drag-and-Drop of ListView Elements

When I use a Button control in DataTemplate for ListView (UWP app), Drag-and-Drop of ListView items doesn't work. If I use containers like StackPanel, RelativePanel or Grid, instead of Button control, everything works fine. I would prefer the Button control as a container, because I like its mouse Hover effect on ListView items. I can do something similar for StackPanel, etc, with a custom hover effect by using a combination of Style and Behavior programming but trying to avoid this route (too involved).
Can I do something to the Button control so that it gives me the hover and also responds to the Drag-and-Drop event when part of a ListView DataTemplate?
I am also curious what specifically makes the Button suppress the Drag-and-Drop of ListView items.
The Button is capturing the pointer which cause the pointer click event not be bubble up to the ListViewItem which cause the Drag&Drop to start.
You can take a look at ReleasePointerCapture method which will release the pointer capture allowing other item to capture it.
You will need to create a new class which extends the default Button class and override for example the OnPointerPressed method to choose the logic between the drag&drop and the click on the button.

Switch between panes in Pharo v3

While at the System Browser I can switch between panes and buttons using alt+tab and arrows, but once I'm at the "method editing" pane I can't go out of it using keyboard shortcuts. Is there a way to do so?
This is a well-known issue. KeyMapping is being overhauled. You can add your own for the moment.
Take a look at the class side of AbstractNautilusUI
you can switch the focus to the other panels:
cmd+g+c focus class list
cmd+g+p focus package list
cmd+g+m focus method list
cmd+g+t focus protocol list
cmd+g+s focus source code panel
in the window menu (little arrow icon on the title pane) is a menu entry
for the shortcuts description

How can I link a Button to a TreeView?

Hi everybody i'm new in this,i'm doing the designing a program(don't know barely nothing of coding), i need to link a button to a TreeView to appear,so when i click the button the treeview shows,when clicking other button,another treeview appears.
How can i do this?
Thanks
Im newbie!
Name the tree view controls with an x:Name attribute in the XAML. This will give you an instance which you can manipulate from code behind.
Subscribe to the click event of the button.
Set the Visibility property of the tree view to Visibility.Collapsed or Visibility.Visible in the click handler code.

MenuItem in Compact Framework 3.5

Is there anyway to programmatically force a MenuItem to raise their popup event? Basically, if you click on it with your stylus or finger, it shows the MenuItem collection for that specific MenuItem. I'd like to be able to do by using a button that I capture.
If you add your menu items to a ContextMenu you can then call ContextMenu.Show with a position and it will show the context menu at that position.
So you could do that in your button click event. Or did you want to 'fake' taps on the menu buttons on the soft menu bar?

Simulate Winforms Button Click Animation

I have a button and inside my button I have an image control. When the users click on the image I'd like to animate the button so it appears the button was pressed. I don't really care whether the actual button press event fires or not--it's the illusion of a button press I want to see.
Note: the only options I see on the web involve writing directly to the Windows API--a level of complexity and non-upgradability I really don't want to get into.
Why not just use two different images, one for a normal state, and another for when your button is being pressed.
If you want to go for more complicated route try using GDI+. Here is a quick sample tutorial on how to do this.
Why are you using an image control inside your button control instead of using the button control's Image property?
Using the Image property of the button will give you a button with an image that the user can press and that will raise the OnClick event without doing any extra work or re-implementing features that are already available.
I ended up making my picturbox look like a button by giving it a raised border style. Then on the mouseclick event I simulate the look of a button press by changing the border style for a few hundred miliseconds.
Private Sub simulateButtonPress(ByRef pictureBox As Infragistics.Win.UltraWinEditors.UltraPictureBox)
pictureBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Inset
Application.DoEvents()
System.Threading.Thread.Sleep(400)
pictureBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Raised
Application.DoEvents()
End Sub