giving effects to buttons in vb.net - vb.net

Image shows the buttons on my UI in vb.net
All these buttons are having background images. Now what i want is these buttons be shown as inactive when actions corresponding to them are not available so I am making them cmd.enable = false but still on UI there is no visual effect of this disabling them on these buttons. They keep looking same as in enabled mode. So how to give effect of disabled state to these buttons.
In the same way i want effect to be visible when mouse is hovered over these buttons and buttons are clicked

They don't look like buttons at all, it looks like a row of images. Use a real Button or a ToolStrip with ToolStripButtons, set their Image property. When you set their Enabled property to false then they automatically remove all color from the image, making it look disabled.

Related

Transparent control or user control in vb.net

I am trying to make a transparent control with child controls that are visible and opaque.
I have added a panel control to the main form via code in the form load event. In this I am adding five buttons as child controls like: panel.controls.add(). To all of these, I have set backcolor=color.transparent.
When I run this program, the button background shows the background of the next button in the panel. If I open a child form, then I can see labels on the child form as the background of the panel.
I want to make container panel control completely transparent, so I can see the main form through it. How can this be achieved?
When the form loads, you can see neighbor buttons behind the actual buttons
"Perform Check" is a label on a child form which I opened right before taking this picture.
: "Check Cases and Combinations" is a button on a child form which I opened right before I took this picture.
How can I make it truly transparent? Why doesn't the background of the panel control refresh with the main form background? The panel sort of "keeps" whatever happens on the main form and shows it as a background.
I found out there some issues with setting controls that are transparent and on top of other controls in the main form. They take the background of the container form, whether or not there is any control in between. I used WPF form instead of the panel and it worked perfectly.

Cocoa - Replicate mail button bar

How do I replicate the appearance of the button bar in the Mail App? I'm pretty close, but I cannot seem to get the colors to work the way I want.
If I set the background color for the view containing the buttons, it won't look the same as the NSTableView above it when the window loses focus.
Here is my app with focus:
My app without focus:
Mail.app with focus:
Mail.app without focus:
So in short, I want the same behaviour as the mail button bar with or without focus. How would one do that?
After spending a lot of time on this and then after finally asks a question here, I manage to fix it.
What I did was adding a bottom bar in IB and then programmatically setting the same color on the bottom bar as the background color on the NSTableView.

Infragistics State Button Checked doesn't show borders

Here is my question. I have some state button tools in my Toolbars Manager. When I set Checked = True, I don't see that button is checked. Actually I see it, but without borders as usual. Instead of that I can see light-light blue background in my state button tool. Could you please answer why is it happen and how can I change my code to view state button checked state as usual (with borders and usual background) ?
I was able to reproduce your problem setting the BorderAlpha property to Transparent.
Resetting to Default reenables the border around the Tool.
The property is present in every Appearance settings of the button, but the one I have used is the PressedAppearance of the Tool (Large or Small depending on your customization)

disable touches behind a sprite

I have a menu in my app, with clickable buttons using CCMenuItemImage. When you press one of the buttons, for example buy button it spawns anther image on top of everything, a confirmation screen(do you really want to buy this item). This screen is placed on z:100 just to be sure it is on top of everything.
The problem is the buttons on the menu below(buy, back, next(all CCMenuItemImage)) are still clickable. I had the idea to just use [button setIsEnabled:NO]; but this doesn't seem to work unless the CCMenuItemImage has a disabledImage set, but some of my buttons (next, previous) use the disabledImage and it looks silly to make the buttons disabled when this confirmation screens shows up.
Is there a way to just disable all the touches to the buttons below and only allow the confirm screen to take touches?
Set the enabled property of the CCMenu to NO. If that doesn't work without disabled images simply set the CCMenu visible property to NO. This also disables the menu reacting to touches.

Custom UI segmented control

I'm wondering if in IOS is possible to customize segmented control like the attached image. I have tried to change buttons image, but the segmented control container is still visible under the customized buttons. I observed that the segmented buttons title disappears if you add button image. Custom button images must include title?
Many thanks
Just roll your own. Make three UIButtons with two images for each state and write logic to allow only one of them to be selected.