Hello All,
I am using Titlebar Display policy in vision to show title bar in popup windows. It looks very old and doesn't go with our theme. How do I change the style color of it?
I am sure I read it somewhere that it could be changed. May be it was for message box and not this but It would be great if we can customize this.
We created our own as a template, and set all the popups to not have a titlebar. You have to do some scripting on the mouse events so you can move the popup, but it allows us to customize the titlebar and style it to our needs.
2 Likes
Yes, We do that currently as well but would like to use default options from software. I know it's not a huge issue but would be good to know if we can customize that title bar in anyway.
I agree it would be nice to be able to style it. However, we had need to add custom buttons/actions to buttons in the header. So we went the template route.
If you do find a way update this thread... would be handy to know.
I did as @bschroeder did as well, as for me at least, it is a huge eyesore and detracts from an otherwise attractive ui
1 Like
I haven't tried this, but maybe look into this exchange resource:
I tried it and it's a good place to start. I liked it enough that I used it as a base for all my faceplates. I removed the hover animation/color change on the title bar, but made the colors as parameters so I could customize them for some specific use cases I had, and added both a tool tip and maximize button that does a simulated maximize of the window (I tried some Java functions to maximize but they didn't work so gave up and just resized the window instead)
1 Like
For those wondering what those scripts are, on your popup's root container add this to the mouse pressed script
window = system.gui.getParentWindow(event)
offsetX = event.getXOnScreen() - window.getX()
offsetY = event.getYOnScreen() - window.getY()
window.putClientProperty("drag_offset", [offsetX, offsetY])
and add this to the mouse released script
window = system.gui.getParentWindow(event)
offset = window.getClientProperty("drag_offset")
if offset:
newX = event.getXOnScreen() - offset[0]
newY = event.getYOnScreen() - offset[1]
window.setLocation(newX, newY)
1 Like
Did I miss something or did this code get inadvertently posted on the wrong thread? [I've made this mistake when replying with multiple tabs open]
I only ask because I don't see how repositioning a popup relates to the look and feel of the title bar.
1 Like
If you look at the post he replied to it will make sense
basically, to get the look and feel you want, you remove the Java titlebar altogether and build your own, but then you lose window drag functionality without adding it back in wirh a script. But that script wasn't provided in the original reply post
2 Likes