Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Urs Eggmann" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: Close button in tabcontrol Date: Mon, 7 Sep 2015 23:26:39 +0200 Lines: 46 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Trace: individual.net VjTyiwy7+mOoDgTUqMdPLwHpbuZjv5A8DQ5+0rFg1RBvSHxg52 Cancel-Lock: sha1:EShpFyXYM9+AGFnbYd6SYErGQmg= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: csiph.com comp.lang.clipper.visual-objects:8409 Hi Dick, Do you want to place a close-icon onto the Tab, not the TabControl? That is a difference. Just something similar. Take the ODT-TabControl from Karl Heinz Rauscher's homepage. In the Dispatch Method of the Class New TabControl add a CASE oEvent == WM_RBUTTONDOWN and insert here the code for closing the window and deleting the tab. CASE oEvent:message == WM_RBUTTONDOWN SELF:DeleteTab(SELF:SelectedTab) So, you can choose the TabPage with left click and close/delete with right click. Information of user with tool tips. Dividing the Tab into two different sensitive areas would be more tricky. Probably you can make the icons in this sample sensitive to a mouse click..... Regards Urs "D.J.W. van Kooten" schrieb im Newsbeitrag news:hcmrua52sfahe1kjb4026o1ps9gla39omq@4ax.com... > On Mon, 7 Sep 2015 12:32:42 +0200, "Johan Nel" > wrote: > > Hello Johan, >> >>What should the close button do? Close the TabPage or close the Form >>Window >>it displays on? > > The underlying code isn't the problem. The problem is: how can we get > a close button on the tab control - IF we can. We would prefer it to > do like the tabs on FireFox or IE. > > It then closes the window displayed in the tab and then removes the > tab. We use tabs to display e-mails; every e-mail opened from the > bBrowser shows in a seperate tab. If the user now wants to close one > of these e-mails, he must click a Close button on the main window. > This works but isn't logical in the eye of the user. > > > Dick