1. Thilo Mack
  2. PowerBuilder
  3. Thursday, 24 February 2022 09:14 AM UTC

Hello,

we have recently started using themes and are wondering if there is any option to make the resize area bigger.

Resizing at the corners is nearly impossible. Resizing at the sides is difficult.

Our margin is 1px which looks nice.

The only solution we found to make the resize area bigger, is to increase the size of the border.

However this does not look visually appealing like above solution.

The border does also affect the available space within the window. See the different space between the DW and the border on the right side.

When you hover around a Windows window the resizing area is bigger then the window itself.

The resizing starts at the red line:

Is there any way to increase the resize area, without increasing the border size and without writing manual code?

Is there a way to make the window border transparent or with a gradient color?

Will there be updates to this behaviour in future versions of PB?

 

Thanks in advance ;)

 

Cheers,

Thilo

 

 

 

 

 

 

Benjamin Gaesslein Accepted Answer Pending Moderation
  1. Monday, 28 February 2022 12:40 PM UTC
  2. PowerBuilder
  3. # 1

Hi Thilo,

this is an unfortunate limitation of the current PB theme functionality.

The corner resize grip John mentioned can be implemented in "pure" PB:
Simply add a small picture control and add to it a user event, choosing the Event-ID pbm_nchittest in the dropdown. Then simply return the value 17 ( = HTBOTTOMRIGHT) and this picture control will work as a resize handle. I do this using themes and it works. You still have to ensure that the control stays in the corner, I do this using the pfc resize service.

In theory it could also be used to add invisible areas to the left, lower and right window borders in order to increase the area you need to hit with the mouse. I've played around for it but couldn't get it to work for anything other than HTBOTTOMRIGHT though. For other possible values see:

https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-nchittest

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 25 February 2022 15:43 PM UTC
  2. PowerBuilder
  3. # 2

Greetings, Thilo -

If your application uses an ancestor window object, one possible alternative would be to add a resize "grip" to the lower-right corner of the ancestor window, as shown in the close-up below:

Like you, I find ultra-thin resizable window borders difficult and frustrating to use. A resize grip makes resizing much easier.

I have a sample program in CodeXchange that includes this functionality, if you're interested:

https://community.appeon.com/index.php/codeexchange/powerbuilder/265-pfc-resizing-example-application

The sample program primarily illustrates a proposed methodology for implementing complex resizing scenarios when using the Resize service included in the PowerBuilder Foundation Class (PFC) framework. The addition of the grip control to a window does not require using the PFC. It does require use of a small user object (the grip control), a small about of code in several window events and three Windows API functions (GetCapture, SetCapture and ReleaseCapture).

A companion tutorial includes helpful information about implementing the resize grip:

https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/315-the-pfc-resize-service-complex-resizing-via-a-simple-methodology

I need to mention that I have not tried using this resize grip control in a "themed" app, so I can't say how well it looks and/or works with Themes. If you decide to try it, I'd be very interested to hear back from you how well it works.

I hope you find this helpful.

Best regards, John

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 10 March 2022 12:49 PM UTC
Hi John ... FYI: there is a ticket in the support system - as an enhancement request - to add the grab bar feature to the Window Class in general.
  1. Helpful 2
  1. John Fauss
  2. Thursday, 10 March 2022 14:23 PM UTC
That's good to know, Chris, although I'm not going to be holding my breath to see if or when it becomes a reality. Thank you for this information!
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 10 March 2022 19:36 PM UTC
I am going to be specifically looking for this in the PB2022 Alpha / Beta testing. ;-)
  1. Helpful
There are no comments made yet.
Steffen Chrobok Accepted Answer Pending Moderation
  1. Thursday, 10 March 2022 09:35 AM UTC
  2. PowerBuilder
  3. # 3

Hi, did Someone found a better Solution then the "Grip"?
@Thilo Mack, how did you increase the size of the border? 

The "Grip" is hiding in the Main Window... and in Response Windows it rezised itself and not the Window....

To be honest, I think that the "Grip" is only an emergency solution anyway, the edges of the windows must be grippable normally...

I'm grateful for every tip

 

Best regards, Steffen

     

 

Comment
  1. Thilo Mack
  2. Thursday, 10 March 2022 09:41 AM UTC
Hi,

we reluctantly chose to increase the border size.



You can adjust them in the theme.json file.



"window":

{

"border":

{

"margin":[4,30,4,4]

}

}



For 4px wide window borders.



Best regards
  1. Helpful 2
  1. Benjamin Gaesslein
  2. Friday, 11 March 2022 06:05 AM UTC
"in Response Windows it rezised itself and not the Window"

Yes, in non-resizable windows it gets weird. I hide it in such cases. (and when the windows is maximized)
  1. Helpful
  1. James Levin
  2. Monday, 19 December 2022 20:18 PM UTC
We just updated our application to use themes and our users ran into this issue. we chose "margin":[3,30,3,3] for a smaller boarder

Thank you
  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.