[Ann]Trixi's Tabsheets

in initialvalue each line is a tab, there is also functions to addtab or rename tab by name or index. to switch tabs on a pagepanel add an action event to the SimTabPanel and:

Sub Action()
  PagePanel1.Value = me.value -1
End Sub

insert and remove tab by name or index as well

Yeah, in your example I think you tried to make it draw 4 tabs: home, page 1, page 2, and page 3. However the only tab that is draw is the Home tab. Or am I not understanding what you are saying?

If you re-download the link I posted, I’ve updated the link with a complete demo of the functions all working. In the InitValue each tab is entered on a separate line (not tab delimited as with the Xojo TabPanel.

Right I got that. The problem is the initial value is only creating a single tab even though there is 4 lines of text for tab names.

What platform are you using? This control has been tested on Mac 10.6, 10.7, Windows 7/8, and Ubuntu Linux 10.04+

Mac 10.7.5. Pictures of initial value and running application.

In the open event, try using the AddTab function and see if that’s any different. (only asking because AddTab edits the initValue manually at runtime and I’m wondering if it’s a Xojo encoding error for EndOfLine…the function handles this per-platform) Is the AddTab function working for you? If so, this is another bug I get to report to Xojo regarding the IDE :slight_smile:

AddTab in the open event works. Looks like it’s an IDE bug :(.

Indeed it is. I’ve found a dozen or so bugs in the IDE since Christmas… the AddTab function handles EndOfLine as such
EndOfLine.Macintosh
EndOfLine.OSX
EndOfLine.UNIX
EndOfLine.Windows

depending on the platform. It would appear the Xojo IDE is using EndOfLine synchronously or has an incorrect #if TargetMacOS/TargetWin32 somewhere. Always good to know I’m not losing my mind when coding :slight_smile:

I always deal with text that needs to worry about platform-specific EOL with:

theLocalText = ReplaceLineEndings(theReceivedText, EndOfLine)

Then I use theLocalText and all is well.

Yes @Tim Jones, but the Property Inspector is not taking platform into consideration with EndOfLine… which can be very difficult to explain to developers buying your controls for use in their own software (Looks like your fault). Real Studio still takes it into consideration :slight_smile:

If you run that on a given platform, it will take the EOL supplied by “theRceivedText” and convert it to THAT platform’s proper EOL.

The inspector may not be reporting Windows EOL on the Mac, but the application will see Windows EOL when run on Windows.

I finished recreating the tab control so the tabs are draggable. If someone can tell me how it functions on retina, that would be appreciated. Any other feedback is welcome.
https://www.dropbox.com/s/ruroimkpsy2buzu/draggable%20tab%20control.zip

Edit: Updated the link to remove a small bug.

jason, the link does not work for some reason

Weird its working for me. Try this one.
https://www.dropbox.com/s/ruroimkpsy2buzu/draggable%20tab%20control.zip

working now… thanks

Ok cool. Let me know what you think.

i got this error when open but show up after clicking ok.

Maybe this version is fixed? I think that’s the retina change Beatrix mentioned.

Are you on retina? How does the tab spacing look?