PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Picture in TitleBar  (Read 586 times)

James Zukowski

  • Diamond Member
  • *****
  • Posts: 240
    • View Profile
Picture in TitleBar
« on: March 10, 2022, 09:04:51 AM »
We've got a TitleBar doing pretty much what we want: multi_lines in different positions, etc. But we have a picture that we want centered left/right in the bar, and it's not happening. It doesn't move relative to the left edge. Are we missing something?
Thanks!
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Jane Raymond

  • Staff
  • Diamond Member
  • *****
  • Posts: 263
    • View Profile
    • PVX Plus Technologies
Re: Picture in TitleBar
« Reply #1 on: March 10, 2022, 03:32:15 PM »
To get an image centered in the toolbar, I did two things:
1. For the image, I defined the Image Format to be Centered (preserve aspect ratio)
2. I set Panel Sizing to Resizable/Custom, and set the image control have Stretch sizing.
Jane Raymond
Software Developer
PVX Plus Technologies Ltd.

James Zukowski

  • Diamond Member
  • *****
  • Posts: 240
    • View Profile
Re: Picture in TitleBar
« Reply #2 on: March 11, 2022, 04:37:48 PM »
I hope we're talking about the same thing: I'm referring to a Custom TitleBar; you mentioned ToolBar. We had started trying to use an embedded panel, but stretching did all directions, not just horizontally, which is what we want.

I've tried setting the PX_TITLEBARHDR_TEXT element to the picture we want, stretched it to the margins, and set it to "Centered (preserve aspect ratio)", but it doesn't seem to want to be repositioned.

We're currently using PxPlus 2018 (v15.10) with WindX on Linux.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Jane Raymond

  • Staff
  • Diamond Member
  • *****
  • Posts: 263
    • View Profile
    • PVX Plus Technologies
Re: Picture in TitleBar
« Reply #3 on: March 11, 2022, 06:28:36 PM »
Sorry, I did mean titlebar, not toolbar.
How is the panel sizing set? And how is the resizing for the image set?
Jane Raymond
Software Developer
PVX Plus Technologies Ltd.

Jane Raymond

  • Staff
  • Diamond Member
  • *****
  • Posts: 263
    • View Profile
    • PVX Plus Technologies
Re: Picture in TitleBar
« Reply #4 on: March 14, 2022, 09:16:55 AM »
Attached is an exported library text file titlebar.txt that you can import to a new library.
It contains a titlebar with a centered image.
Jane Raymond
Software Developer
PVX Plus Technologies Ltd.

James Zukowski

  • Diamond Member
  • *****
  • Posts: 240
    • View Profile
Re: Picture in TitleBar
« Reply #5 on: March 16, 2022, 10:53:54 AM »
THANK YOU for that sample. I stopped trying to get ours to work, and just ported the controls we needed into yours, and all is well.
Not sure what the problem was, but too much else going on to try and figure it out now.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services