Here's what happens when i use some menu on a button.
Has anyone came across this problem?
Printable View
Here's what happens when i use some menu on a button.
Has anyone came across this problem?
I've looked at your images, but I'm not sure what problem you are referring to?
Are you saying that the image goes black and white instead of colored?
:lol:Quote:
Originally Posted by RobDog888
No. That's meant to happen. I'm shifting icons (filters) fill color if user uses a filter or not (like in Oracle for example).
The problem is that second image represents the ToolBar when already LOST FOCUS. It should look... "normal"/unselected, but it still looks like there's a mouse over.
Oh the dropdown button part of the button is still depressed (not the illness tye of sadness :D).
What code can you post to show how you are interacting with the button?
It's really simple:Does the fact that i'm connecting to the machine where app is being developed, via VPN, helps? Could it be some MSTSC's issue?Code:Private Sub tlb_ButtonMenuClick(Index As Integer, ByVal ButtonMenu As MSComctlLib.ButtonMenu)
Select Case ButtonMenu.key
'few cases...
'few lines of code...
Case "odstrani_filter_iz_prikazanega_seznama"
'this seems to be making the problem
'one String is set to vbNullString and few methods are being called
m_strZadnjiFilter = vbNullString
OdstraniZadnjiFilterIzRegistra
Inicializiraj
PonastaviMeniInIkoneOsvezevanjaInFiltriranja
End Select
End Sub
That may be the case as the screen may not be repainting correctly. Can you try moving the form when it is doing that issue and see if it pops up?
It stays like that until i pop up the menu again no matter what. I have tried to use DoEvents() before the action, Button.Refresh() after action,... and similar stuff but nothing seems to be working.
It's interesting. If i remove the code button redraws normally after clicking the menu item.
I'll try it on the local machine someday this week to see what happens.
Then it must be something in your code that is locking it up. With the sample demo code you posted there is not real code in it so I couldnt really say.
It's not a sample :)
That's what the code does. It sets one string to vbNullString and calls few Procedures. Everything is TOTALLY unrelated to the ToolBar.
Ok. Now i found out, that if i set a pause before the Select Case statement it works - but not always. The longer the pause is the biggest the chance is that button will redraw correctly.
No, I mean those called procedures are probably exiting out somehow and not letting the button complete its button up redrawing stuff.
Possibly. As said. Will try it locally someday this week to see the results.
Ok. A bit late, but still. It was/is a MSTSC issue. Solved!