Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #8404 > unrolled thread

Close button in tabcontrol

Started byD.J.W. van Kooten <vankooten@removethis.ic2.com>
First post2015-09-07 12:29 +0200
Last post2015-09-07 11:00 -0400
Articles 9 — 4 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Close button in tabcontrol D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2015-09-07 12:29 +0200
    Re: Close button in tabcontrol "Johan Nel" <johan.nel@xsinet.co.za> - 2015-09-07 12:32 +0200
      Re: Close button in tabcontrol D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2015-09-07 20:42 +0200
        Re: Close button in tabcontrol "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2015-09-07 23:26 +0200
          Re: Close button in tabcontrol D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2015-09-08 15:00 +0200
            Re: Close button in tabcontrol "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2015-09-10 12:06 +0200
              Re: Close button in tabcontrol D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2015-09-11 09:59 +0200
    Re: Close button in tabcontrol "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2015-09-07 15:48 +0200
    Re: Close button in tabcontrol "Jamal Assaf" <someone@example.com> - 2015-09-07 11:00 -0400

#8404 — Close button in tabcontrol

FromD.J.W. van Kooten <vankooten@removethis.ic2.com>
Date2015-09-07 12:29 +0200
SubjectClose button in tabcontrol
Message-ID<qkpquahdbvi2fp1qie8quofmhl4dtoo2sm@4ax.com>
Did anyone try (and succeed) to implement a Close button in a
tabcontrol?

I've found that it isn't standard in Winforms or WPF either but there
are some code samples to implement it. I don't think I can 'port' this
to VO.

Dick

[toc] | [next] | [standalone]


#8405

From"Johan Nel" <johan.nel@xsinet.co.za>
Date2015-09-07 12:32 +0200
Message-ID<msjp15$sl8$1@dont-email.me>
In reply to#8404
Hi Dick,

What should the close button do?  Close the TabPage or close the Form Window 
it displays on?

Johan Nel
Vulcan VIP
George, South Africa.

"D.J.W. van Kooten" <vankooten@removethis.ic2.com> wrote in message 
news:qkpquahdbvi2fp1qie8quofmhl4dtoo2sm@4ax.com...
> Did anyone try (and succeed) to implement a Close button in a
> tabcontrol?
>
> I've found that it isn't standard in Winforms or WPF either but there
> are some code samples to implement it. I don't think I can 'port' this
> to VO.
>
> Dick



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

[toc] | [prev] | [next] | [standalone]


#8408

FromD.J.W. van Kooten <vankooten@removethis.ic2.com>
Date2015-09-07 20:42 +0200
Message-ID<hcmrua52sfahe1kjb4026o1ps9gla39omq@4ax.com>
In reply to#8405
On Mon, 7 Sep 2015 12:32:42 +0200, "Johan Nel"
<johan.nel@xsinet.co.za> 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

[toc] | [prev] | [next] | [standalone]


#8409

From"Urs Eggmann" <Urs.Eggmann@shinternet.ch>
Date2015-09-07 23:26 +0200
Message-ID<d56donF1tq4U1@mid.individual.net>
In reply to#8408
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" <vankooten@removethis.ic2.com> schrieb im Newsbeitrag 
news:hcmrua52sfahe1kjb4026o1ps9gla39omq@4ax.com...
> On Mon, 7 Sep 2015 12:32:42 +0200, "Johan Nel"
> <johan.nel@xsinet.co.za> 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 

[toc] | [prev] | [next] | [standalone]


#8410

FromD.J.W. van Kooten <vankooten@removethis.ic2.com>
Date2015-09-08 15:00 +0200
Message-ID<9smtua1992o0n1jql2pnc1dk26fboopjtc@4ax.com>
In reply to#8409
On Mon, 7 Sep 2015 23:26:39 +0200, "Urs Eggmann"
<Urs.Eggmann@shinternet.ch> wrote:

Hello Urs,

>Do you want to place a close-icon onto the Tab, not the TabControl?
>That is a difference.

My preference would be on the tab, like in Firefox or IE. That's where
users expect it.
>
>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.

Hmmm.. this is not so bad, as an alternative. Unless someone else
comes has solved this completely, it is a good second choice. Thanks
for that!



Dick

[toc] | [prev] | [next] | [standalone]


#8413

From"Urs Eggmann" <Urs.Eggmann@shinternet.ch>
Date2015-09-10 12:06 +0200
Message-ID<d5d357Fllt0U1@mid.individual.net>
In reply to#8410
Hi Dick,

I'm working on the following idea:
Place a Icon (with a cross like x) on the tab,
place a BoundingBox around,
evaluate in the Dispatch the message WM_LBUTTONDOWN inside this BoundingBox 
for deleting the tab.
It worked with the first tab, but I'm still fighting with coordinates (g...)
If I have success, I let you know.
Regards
Urs

"D.J.W. van Kooten" <vankooten@removethis.ic2.com> schrieb im Newsbeitrag 
news:9smtua1992o0n1jql2pnc1dk26fboopjtc@4ax.com...
> On Mon, 7 Sep 2015 23:26:39 +0200, "Urs Eggmann"
> <Urs.Eggmann@shinternet.ch> wrote:
>
> Hello Urs,
>
>>Do you want to place a close-icon onto the Tab, not the TabControl?
>>That is a difference.
>
> My preference would be on the tab, like in Firefox or IE. That's where
> users expect it.
>>
>>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.
>
> Hmmm.. this is not so bad, as an alternative. Unless someone else
> comes has solved this completely, it is a good second choice. Thanks
> for that!
>
>
>
> Dick 

[toc] | [prev] | [next] | [standalone]


#8414

FromD.J.W. van Kooten <vankooten@removethis.ic2.com>
Date2015-09-11 09:59 +0200
Message-ID<a525vatugkqbsv8v7f3076i8bh1aqtqlbd@4ax.com>
In reply to#8413
On Thu, 10 Sep 2015 12:06:43 +0200, "Urs Eggmann"
<Urs.Eggmann@shinternet.ch> wrote:

Hello Urs,
>
>I'm working on the following idea:
>Place a Icon (with a cross like x) on the tab,
>place a BoundingBox around,
>evaluate in the Dispatch the message WM_LBUTTONDOWN inside this BoundingBox 
>for deleting the tab.
>It worked with the first tab, but I'm still fighting with coordinates (g...)
>If I have success, I let you know.
>Regards
>Urs

I am impressed with what you have achieved in the meantime. You've
once more impressed me with your code to rebuild bBrowser which
increased the speed of that process up until a factor 6 and now again
you do.

Especially if you realize that the .Net solutions aren't standard
either and in general look less appealing as the work in progress you
mailed me.

I am looking forward to your solution!

Dick

[toc] | [prev] | [next] | [standalone]


#8406

From"Urs Eggmann" <Urs.Eggmann@shinternet.ch>
Date2015-09-07 15:48 +0200
Message-ID<d55itlFpd8dU1@mid.individual.net>
In reply to#8404
Same Question as Johan asked.

If Yes

METHOD pbClose() CLASS tsb1_Page10 // Datawindow on a TabControl
SELF:Owner:EndWindow()
RETURN NIL

endif

regards
Urs

"D.J.W. van Kooten" <vankooten@removethis.ic2.com> schrieb im Newsbeitrag 
news:qkpquahdbvi2fp1qie8quofmhl4dtoo2sm@4ax.com...
> Did anyone try (and succeed) to implement a Close button in a
> tabcontrol?
>
> I've found that it isn't standard in Winforms or WPF either but there
> are some code samples to implement it. I don't think I can 'port' this
> to VO.
>
> Dick 

[toc] | [prev] | [next] | [standalone]


#8407

From"Jamal Assaf" <someone@example.com>
Date2015-09-07 11:00 -0400
Message-ID<msk8qd$khl$1@speranza.aioe.org>
In reply to#8404
Dick,

Same like the previous responses, however, this does not make sense; a tab 
control is just a child control and a container to tab pages.  It's better 
to have a close button on the parent (owner) window (form).

If you intention is to hide it, you can use the hide/show the tab control 
while keeping the parent window open, then use self:oDCTabControl1:Hide() / 
self:oDCTabControl1:Show() methods.
Also you can use the self:oDCTabControl1:DeleteAllTabs() which will destroy 
all tab pages and reclaim resources, then hide() it.

Jamal


"D.J.W. van Kooten"  wrote in message 
news:qkpquahdbvi2fp1qie8quofmhl4dtoo2sm@4ax.com...

Did anyone try (and succeed) to implement a Close button in a
tabcontrol?

I've found that it isn't standard in Winforms or WPF either but there
are some code samples to implement it. I don't think I can 'port' this
to VO.

Dick 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web