Webtabpanel how to change color caption of panel?

Hello,

how i can change caption font color of webtabpanel ?

Tank very much

Maurizio

You will need some JavaScript-fu. Here is a sample project extending WebTabPanel to have a new method called TabForegroundColorAt, allowing you to use the following code:

MyTabPanel.TabForegroundColorAt(2) = Color.Green

Sample project:
WebTabPanel-TabColor.xojo_binary_project.zip (9.4 KB)

But please feel free to open a new Feature Request for having that feature bundled into the Xojo Web Framework.

5 Likes

Have an updoot for the term JavaScript-fu :stuck_out_tongue:

2 Likes

I’m using v2025 R2.1 for a project, and curious if there’s a built-in way to change the Font color (style) of the captions in the WebTabPanel tabs.

Built-in, no. Even on later Xojo. That is why Ricardo did some JavaScript-fu for the example above.

I don’t have 2025r2.1 here, the sample above doesn’t work there?

Hi @AlbertoD , I haven’t given the JavaScript-fu a chance yet, I was hoping that since other WebStyle’s work (like the snippet below) that perhaps there was some working xojo-native solutions. I will give the JavaScript-fu a try :slight_smile:

Var style As New WebStyle
style.Bold = True
Me.Style = style