TabPanel

Post

Posted
Rating:
#1 (In Topic #1475)
Regular
rj71 is in the usergroup ‘Regular’
 Hi All,
I found WebBrowser 1.1.2 on the software farm. I don't see a user name or author so I don't who to credit or mention. I use a really old iMac for building Gambas apps and I love it but most browsers slow it to a crawl so this app is fairly good replacement for the common browsers. It has tabs using the tabpanel which I really like and the main reason I've been using it but while using the app, the URL tabs are not very wide and I am always accidentally closing tabs. So my question: is there a way to widen the tab part (the top) of the tabpanel? I don't see a way to do that with the properties. If not, any suggestions of an alternative to the tabpanel? I like this app and time permitting I'd like to add a few custom things of my own to it.
Online now: No Back to the top

Post

Posted
Rating:
#2
Banned
No but you could import the source into your project end edit it.
comp/src/gb.form/.src/TabPanel · master · Gambas / gambas · GitLab
Online now: No Back to the top

Post

Posted
Rating:
#3
Regular
rj71 is in the usergroup ‘Regular’

BruceSteers said

No but you could import the source into your project end edit it.
comp/src/gb.form/.src/TabPanel · master · Gambas / gambas · GitLab

Thanks Bruce, I'll take a look at that.
Online now: No Back to the top

Post

Posted
Rating:
#4
Banned
or maybe something like this using the hidden _GetButton() method..

Code (gambas)

  1.  
  2. Public Sub TabPanel1_Arrange()
  3.  
  4.   For c As Integer = 0 To TabPanel1.Count - 1
  5.     TabPanel1._GetButton(c).Expand = True
  6.   Next
  7.  
  8.  
  9.  

_TabPanel_Button.class inherits UserControl so maybe can set .Width too?
Online now: No Back to the top

Post

Posted
Rating:
#5
Banned
I did a test. seems setting .Expand does not work :(

This works though…
It manually divides the tabs widths to fill the window using the .Width property.

Code (gambas)

  1. Public Sub TabPanel1_Arrange()
  2.  
  3.  Dim W As Integer = (TabPanel1.W - (Style.FrameWidth * 2)) / TabPanel1.Count
  4.  
  5.   For c As Integer = 0 To TabPanel1.Count - 1
  6.     TabPanel1._GetButton(c).Width = W
  7.   Next
  8.  
  9.  

Another tip..
In my text editor i use this method to set each buttons Tooltips.
So the tab Text just shows the file name but the tabs tooltip shows the full file path of that tabs document.
Online now: No Back to the top

Post

Posted
Rating:
#6
Avatar
Regular
thatbruce is in the usergroup ‘Regular’
 Pad the tab name with spaces on both sides?

(Just thinking)
b

Online now: No Back to the top

Post

Posted
Rating:
#7
Regular
rj71 is in the usergroup ‘Regular’

thatbruce said

Pad the tab name with spaces on both sides?

(Just thinking)
b

Thanks Bruce. I'll try that when I get a minute. I haven't had a chance to revisit this app as I've been busy with several other projects.
Online now: No Back to the top
1 guest and 0 members have just viewed this.