Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-09

TForm BorderIcons

8 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner
to Roberto P.
Show quoted text 6 lines
Hi, I can see the option biHelp among the other TForm.BorderIcons properties. What shall I do to have the form display the "?" button? It seems that setting the property to true is not enough. Anyone has an example on how to handle it ?

AFAIK only MS Windows supports that.

Mattias

Reply by email

Roberto P.
to Mattias Gaertner

2012/9/6 Mattias Gaertner

Show quoted text 15 lines
On Thu, 6 Sep 2012 16:15:03 +0200 "Roberto P." wrote: > Hi, > > I can see the option biHelp among the other TForm.BorderIcons properties. > What shall I do to have the form display the "?" button? It seems that > setting the property to true is not enough. > Anyone has an example on how to handle it ? AFAIK only MS Windows supports that. Mattias

Well, I am working on Win XP.
Fresh install of Lazarus 1.0 prepackaged installer + some extra components from the CCR.

Before going to call for a bug, is there anyone who can try it on a blank Form ?

R#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120906/b7bd2683/attachment.html>

Reply by email

Howard Page-Clark
to Roberto P.
Roberto P. wrote
Before going to call for a bug, is there anyone who can try it on a blank Form ?

Setting biHelp here (Win 7, 32-bit app) does not give an extra border icon. Presence/absence of a manifest makes no difference either.

Howard

Reply by email

Martin
to Roberto P.: 2012/9/6 Mattias Gaertner Well, I am working on Win XP. Fresh install of Lazarus 1.0…
Roberto P. wrote 21 lines
2012/9/6 Mattias Gaertner < <mailto:>> On Thu, 6 Sep 2012 16:15:03 +0200 "Roberto P." < <mailto:>> wrote: > I can see the option biHelp among the other TForm.BorderIcons properties. > What shall I do to have the form display the "?" button? It seems that > setting the property to true is not enough. AFAIK only MS Windows supports that. Well, I am working on Win XP. Fresh install of Lazarus 1.0 prepackaged installer + some extra components from the CCR.

Tested on Vista

It seems exlusive to the min/max buttons. If both of them are off, then
the "?" will show

biSystemMenu must be set, or nothing will show
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120906/fca76a5c/attachment.html>

Reply by email

Roberto P.
to Martin: Tested on Vista It seems exlusive to the min/max buttons. If both of them are off, then…

2012/9/6 Martin

Show quoted text 29 lines
On 06/09/2012 20:21, Roberto P. wrote: 2012/9/6 Mattias Gaertner > On Thu, 6 Sep 2012 16:15:03 +0200 > "Roberto P." wrote: > > > I can see the option biHelp among the other TForm.BorderIcons > properties. > > What shall I do to have the form display the "?" button? It seems that > > setting the property to true is not enough. > > AFAIK only MS Windows supports that. > > Well, I am working on Win XP. Fresh install of Lazarus 1.0 prepackaged installer + some extra components from the CCR. Tested on Vista It seems exlusive to the min/max buttons. If both of them are off, then the "?" will show biSystemMenu must be set, or nothing will show

I made a little test application (see attachment) to try the various combinations of border icons and border style.
After confirming that the context help icon is exclusive with the max/min ones, and all of them require the system one, I checked the reason why it is so: in Win32WSForms.pp, starting from the line 463, the handler explicitely masks that combination.

Why is it so? The reason might be that this is the way the MSDN describe the usage of the extended window styles:
http://msdn.microsoft.com/en-us/library/windows/desktop/ff700543(v=vs.85).aspx which by design makes the context help mutually exclusive with the max/min.

I tried to force it, violating that rule above and calling with all the flags, but it is probably masked inside the Win32 window manager as well. I think we can't change that...

BUT, I discovered something strange: if you change programmatically the border icons the title bar is not update graphically. If you disable the minimized button, it is still displayed as active, but it's actually disabled.
If you force a refresh (Form.Minimize; Form.Maximize) than it gets update.

On the other side, if you change the borer style, the window is update correctly.
Maybe the difference is that in:

      class procedure TWin32WSCustomForm.SetBorderIcons(..);

the function Windows.RedrawWindow(...) is called, while in

      class procedure TWin32WSCustomForm.SetFormBorderStyle(...);

the function RecreateWnd(AForm) is called.
I think that also the border icons should deserve a true update.

R#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120907/624b8d7d/attachment.html> -------------- next part --------------
A non-text attachment was scrubbed...
Name: bordericonstest.zip
Type: application/zip
Size: 2695 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120907/624b8d7d/attachment.zip>

Reply by email

Roberto P.
to Vincent Snijders: 2012/9/6 Martin : Confirmed in the msdn: http://msdn.microsoft.com/en-us/library/windows/d…

2012/9/7 Vincent Snijders

Show quoted text 9 lines
Confirmed in the msdn: http://msdn.microsoft.com/en-us/library/windows/desktop/ff700543%28v=vs.85%29.aspx WS_EX_CONTEXTHELP cannot be used with the WS_MAXIMIZEBOX or WS_MINIMIZEBOX styles. Vincent

...I should have save my email as a draft, then updated the inbox, before sending!

R#
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120907/1b07ef50/attachment.html>

Reply by email