![]() |
TabControl close button problem |
Post Reply ![]() |
Author | |
preecep ![]() Newbie ![]() Joined: 24 February 2006 Location: United Kingdom Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() Posted: 24 February 2006 at 6:14am |
When creating TabControl tabs using InsertItem, I set .Closeable to false but the far right 'x' close button on the tab control is still displayed. When I click on a different tab and back again the close button disappears. As the TabControl does not raise a closing event it is critical that I stop this button from appearing and it seems .Closeable is bugged. Any ideas ? 9.70 btw |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Can't reproduce it with 9.81, may be it was fixed already try this sample: Do you see problem with it with 9.70 release? |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
preecep ![]() Newbie ![]() Joined: 24 February 2006 Location: United Kingdom Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
After playing around with your sample I have located the problem: If you put an item.Selected=true before the item.closeable=false then the 'x' button will show until the tab is hidden and reshown. Code as below: Set Item = TabControl1.InsertItem(0, "Item", 0, 0)
Moving the .Selected after the .Closeable fixes the problem. |
|
![]() |
|
preecep ![]() Newbie ![]() Joined: 24 February 2006 Location: United Kingdom Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
And after some more testing you cannot stop the first tab from being closeable if it is the only tab. Dim Item As TabControlItem produces a single tab with a close button! Attached project: 2006-02-24_101312_Sa.zip |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Yes, seems the bug with only one item :( Will fix it for next releasea But for one item you always can hide close button with: TabControl1.ShowNavigateButton xtpTabNavigateButtonClose, xtpTabNavigateButtonNone
Thank you |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
The problem was because TabControl not refreshed after Closable property changed. As another workaround you can resize it a little to reposition elements of TabControl: TabControl1.Width = TabControl1.Width + 100
Fixed for next release. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
preecep ![]() Newbie ![]() Joined: 24 February 2006 Location: United Kingdom Status: Offline Points: 9 |
![]() ![]() ![]() ![]() ![]() |
workaround worked fine. thanks. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |