Custom Tab Panel For Retina

We’ve used Custom Tab Panel in the past for projects that required a vertical tab tab panel. It’s fairly dated (but still works) in Xojo but it’s not Retina capable. Just curious if anyone has done the work to make it Retina compatible yet.

i use Custom Tab Panel for many years. it still work even on 64bit

Right, but it’s not Retina aware. It suffers from the fate of a lot of older classes. It uses pictures for a fair number of things and for Retina apps you need to create all the pictures at twice the size. So you either have to do all the drawing at twice the normal size or you draw directly into the graphics object.

It’s probably easier to get it running at double size just due to how it draws everything. But what a pain, though. The conversion of FTC convinced me that drawing directly into the graphics object is a better choice if you can do it.

The code for custom tabpanel is a bit complicated. And I didn’t need all it’s features. So I rolled my own. See http://www.mothsoftware.com/content/xojo/ .

I like what you did. Unfortunately, the one thing I do need is the vertical tabs. I might poke around with it this weekend to see what I can get it to go vertical.

I agree, that the code for CustomTabPanel seems overly complicated for what it does. But we all do what we can with the knowledge we have at the time.

Do you need the tabs just 90 degrees rotated with vertical text or do you want horizontal text? Because I also have some wizard type of progress thing.

That’s very cool. Sadly, I need it rotated so the tabs can be East/West facing like CustomTabs does.

How do you rotate it?

Hmm… you could try to rotate the finished result.

If I find some free time I’ll have a look in the next days. The code needs to be updated for the newish Retina handling in the Xojo IDE anyways.

[quote=302402:@Beatrix Willius]Hmm… you could try to rotate the finished result.

If I find some free time I’ll have a look in the next days. The code needs to be updated for the newish Retina handling in the Xojo IDE anyways.[/quote]

thanks … to rotate it,just change the paint event and add a propety means?“???

No. It’s not that simple.

I’m not in front of my development computer at the moment so I can’t check the code.

As far as I remember the elements are drawn into a picture and this picture is drawn to the canvas in the paint event. Between step 1 and step 2 you have to create a new picture with the correct dimension and do the rotation there (with a RGBsurface). But when I think about this the mouse down needs to be changed, too. So this might not be as easy as I tought.

[quote=302406:@Beatrix Willius]No. It’s not that simple.

I’m not in front of my development computer at the moment so I can’t check the code.

As far as I remember the elements are drawn into a picture and this picture is drawn to the canvas in the paint event. Between step 1 and step 2 you have to create a new picture with the correct dimension and do the rotation there (with a RGBsurface). But when I think about this the mouse down needs to be changed, too. So this might not be as easy as I tought.[/quote]

indeed is not simple… I deal pictures bad… expecting your implments…

What would be wrong with a PagePanel and a tad of drawing into a canvas for the tabs ?

@Michel: This is what my solution does. I need to show the tabs, show the inactive ones, add tabs, hide tabs, make them lower in height, do the retina stuff. And now rotation. It’s not complicated - just a bit of housekeeping is needed.

Oh, you are doing more than the original control, then. That explains the complication :slight_smile:

got the following error when try to run the TrixisTabSheets project on Xojo 2015r4.1 and on the latest beta.

@Richard: yes, got that too, I’ll have a look in the next days.

[quote=302478:@Richard Duke]got the following error when try to run the TrixisTabSheets project on Xojo 2015r4.1 and on the latest beta.

[/quote]
That’s from trying to use Defaults to make changes to the plist instead of PlistBuddy.

[quote=302478:@Richard Duke]got the following error when try to run the TrixisTabSheets project on Xojo 2015r4.1 and on the latest beta.

[/quote]

the program still run after i click on OK here

First of all you can use a plist in your app instead of writing with default or using PlistBuddy.
Second, and most important, now that Xojo create retina apps, there is no need to use this plist modification at all