1. Miguel Leeuwe
  2. PowerBuilder
  3. Wednesday, 5 May 2021 15:52 PM UTC

Hi bright minds,

I need a horizontal trackbar / slider control, but it has to have a transparent background.

  • The powerbuilder trackbar doesn't even allow to set the background colour, so that's a no no.
  • I've tried a .Net winforms trackbar, same problem as in powerbuilder.
  • Then I tried a WPF slider control and wrapped it in a winforms user control, which I then wrapped as an activeX.
    When using the winforms user control in a .net winform application, the control's background is perfectly transparent, but once pasted on a powerbuilder window as an oleobject, I get the same grey background. Even when I set the olecontrol to have a transparent background the background still shows as grey.

Has anyone got an idea why this could be? Can it be done? Does anyone know of a (third party) slider/trackbar control that allows for a transparent background in powerbuilder?

TIA,

regards

MiguelL

 

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Saturday, 8 January 2022 06:20 AM UTC
  2. PowerBuilder
  3. # Permalink
Hi, Miguel - I ran into the same issue with the mousemove event not firing while the left mouse button is down in my PFC Resizing example application (that is available in CodeXchange) to support dragging of the window resize "grip" in the lower-right corner of the window. I was able to solve it by using WinAPI functions to capture and release the mouse. When a window has "captured" the mouse, it receives MouseMove events whiel a mouse button is down. You just have to be sure to release the mouse in the MouseUp event. Examine the code in the MouseDown, MouseMove and MouseUp window events in that sample program: https://community.appeon.com/index.php/codeexchange/powerbuilder/265-pfc-resizing-example-application
Comment
There are no comments made yet.
Benjamin Gaesslein Accepted Answer Pending Moderation
  1. Thursday, 6 May 2021 14:06 PM UTC
  2. PowerBuilder
  3. # 1

Hey Miguel,

For what it's worth, I've found that setting the PB trackbar's transparency value to 50-60 makes it blend in reasonably well with most light-ish background colors while still being visible enough to be usable. (ymmv)

Comment
  1. Miguel Leeuwe
  2. Thursday, 6 May 2021 14:27 PM UTC
Hi Benjamin,

I know, but in our case we have some pretty bright multi coloured image below the bar. Aside from that, I have a manager who'll "cry about a single pixel", so that won't work here.

Thanks though for the suggestion.

regards
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 5 May 2021 17:56 PM UTC
  2. PowerBuilder
  3. # 2

Hi Miguel;

  I have seen this issue before and the answer is no. You could create your own Visual User Object but that could take some R&D time. Same for a customized DWO (as DW's support transparency) as a CVUO. The best might be to look for a 3rd party (maybe in the "PB Ultimate Suite" product) control implemented as an OCX or  better yet DLL.

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 5 May 2021 18:12 PM UTC
Welcome. However, please add an enhancement support ticket so that we can get a transparency feature added to the TrackBar control for maybe PB2022. ;-)
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 5 May 2021 18:44 PM UTC
Will do, to be true, it would be a nice feature for any of the controls to support transparent backgrounds.
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 5 May 2021 19:00 PM UTC
hmmm, that might be exactly what I need!

I'm going to have a look at it.

I've checked out the PBUltimate suite, but 400+ a year per developer just to get a transparent trackbar is too much. Besides, from the properties it doesn't look like it supports transparent backgrounds either. (as much as it's a great product, we wouldn't benefit from it at this moment).

regards,

I'll post the outcome.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.