Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » adding buttons to the right of the TabFolder
adding buttons to the right of the TabFolder [message #451290] Thu, 24 February 2005 17:12 Go to next message
Eclipse UserFriend
Originally posted by: e3oginosX.hotmail.com

i've been trying to find someway of adding buttons to the right of the
TabbedPane but with no success

i want to get some buttons added as illustrated with my beutiful drawing
below
Where X represents a button

As a secondary thing, i also want to add some buttons on each TabItem,
shown as Y in the drawing below


----------------\-----------
| FirstTab Y \ Tab2 Y \ X X
| \__________\______________
|
|
|
|
|
|
|
----------------------------------------------
Re: adding buttons to the right of the TabFolder [message #451298 is a reply to message #451290] Thu, 24 February 2005 21:17 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
In CTabFolder, you can use:

CTabFolder.setTopRight(Control, int)

/**
* Set the control that appears in the top right corner of the tab folder.
* Typically this is a close button or a composite with a Menu and close
button.
* The topRight control is optional. Setting the top right control to null
* will remove it from the tab folder.
* <p>
* The alignment parameter sets the layout of the control in the tab area.
* <code>SWT.RIGHT</code> will cause the control to be positioned on the far
* right of the folder and it will have its default size.
<code>SWT.FILL</code>
* will size the control to fill all the available space to the right of the
* last tab. If there is no available space, the control will not be visible.
* </p>
*
* @param control the control to be displayed in the top right corner or null
* @param alignment <code>SWT.RIGHT</code> or <code>SWT.FILL</code>
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that
created the receiver</li>
* <li>ERROR_INVALID_ARGUMENT - if the control is not a child of this
CTabFolder</li>
* </ul>
*
* @since 3.0
*/
public void setTopRight(Control control, int alignment)



"Kiriakou Andonis" <e3oginosX@hotmail.com> wrote in message
news:cvl1ul$31i$1@www.eclipse.org...
> i've been trying to find someway of adding buttons to the right of the
> TabbedPane but with no success
>
> i want to get some buttons added as illustrated with my beutiful drawing
> below
> Where X represents a button
>
> As a secondary thing, i also want to add some buttons on each TabItem,
> shown as Y in the drawing below
>
>
> ----------------\----------- | FirstTab Y \ Tab2 Y \ X X
> | \__________\______________
> | | |
> |
> |
> |
> |
> ----------------------------------------------
>
Re: adding buttons to the right of the TabFolder [message #451302 is a reply to message #451298] Fri, 25 February 2005 04:47 Go to previous message
Eclipse UserFriend
Originally posted by: e3oginosX.hotmail.com

perfect, thanks

Veronika Irvine wrote:

> In CTabFolder, you can use:

> CTabFolder.setTopRight(Control, int)

> /**
> * Set the control that appears in the top right corner of the tab folder.
> * Typically this is a close button or a composite with a Menu and close
> button.
> * The topRight control is optional. Setting the top right control to null
> * will remove it from the tab folder.
> * <p>
> * The alignment parameter sets the layout of the control in the tab area.
> * <code>SWT.RIGHT</code> will cause the control to be positioned on the far
> * right of the folder and it will have its default size.
> <code>SWT.FILL</code>
> * will size the control to fill all the available space to the right of the
> * last tab. If there is no available space, the control will not be visible.
> * </p>
> *
> * @param control the control to be displayed in the top right corner or null
> * @param alignment <code>SWT.RIGHT</code> or <code>SWT.FILL</code>
> *
> * @exception SWTException <ul>
> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that
> created the receiver</li>
> * <li>ERROR_INVALID_ARGUMENT - if the control is not a child of this
> CTabFolder</li>
> * </ul>
> *
> * @since 3.0
> */
> public void setTopRight(Control control, int alignment)



> "Kiriakou Andonis" <e3oginosX@hotmail.com> wrote in message
> news:cvl1ul$31i$1@www.eclipse.org...
>> i've been trying to find someway of adding buttons to the right of the
>> TabbedPane but with no success
>>
>> i want to get some buttons added as illustrated with my beutiful drawing
>> below
>> Where X represents a button
>>
>> As a secondary thing, i also want to add some buttons on each TabItem,
>> shown as Y in the drawing below
>>
>>
>> --------------------------- | FirstTab Y Tab2 Y X X
>> | ________________________
>> | | |
>> |
>> |
>> |
>> |
>> ----------------------------------------------
>>
Previous Topic:Key event problem on PocketPC
Next Topic:Tree with columns problem
Goto Forum:
  


Current Time: Mon Sep 28 07:13:02 GMT 2020

Powered by FUDForum. Page generated in 0.01764 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top