Page 1 of 2 12 LastLast
Results 1 to 40 of 58

Thread: SSTab, are you crazy?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    SSTab, are you crazy?

    ????Name:  SStabbug.jpg
Views: 1927
Size:  19.0 KB
    Attached Files Attached Files

  2. #2
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: SSTab, are you crazy?

    looks fine on my system, what res and scale are you running, Possible large or extra large fonts enabled.

    Running Windows 7 @1920x1080 125% it wraps the text after the de

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    Hi, thank you.

    I'm using XP SP3 @1920x1080 125% (120 DPI).

    I have extra large fonts for the Windows setting... but how that can be related to the issue?

  4. #4
    Fanatic Member Spooman's Avatar
    Join Date
    Mar 2017
    Posts
    868

    Re: SSTab, are you crazy?

    Eduardo

    Perhaps you could more clearly explain what the issue is.

    Spoo

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    Quote Originally Posted by Spooman View Post
    Eduardo

    Perhaps you could more clearly explain what the issue is.

    Spoo
    As you can see in the image, the TabCaption is "Configuración de página", and there is enought room to put "Configuración" complete in the first line, and perhaps also the second word "de", but it cuts the word "Configuración" in the middle.

  6. #6
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,622

    Re: SSTab, are you crazy?

    Comes out correct on mine, as well: 1366 X 768 Windows 10

  7. #7
    Fanatic Member Spooman's Avatar
    Join Date
    Mar 2017
    Posts
    868

    Re: SSTab, are you crazy?

    Eduardo

    Yeah, I belatedly figured out what your issue might be ..

    I can't replicate your issue, but I tried this code frag ..

    Code:
    With SSTab1
        .TabHeight = 400
        .TabMaxWidth = 1500
        .Tab = 0
        .Caption = "configuraciondepagina"
        .Tab = 1
        .Caption = "configuracion de pagina"
        .Tab = 2
        .Caption = "configuracion" & vbCrLf & "de pagina"
        .Tab = 0
    End With
    ,, and got these results ,,

    Name:  sstab.png
Views: 1376
Size:  2.3 KB

    Unfortunately, in all cases, the text is centered.

    As I said, I couldn't replicate your definitely odd situation of
    ,, left justified top line with weird place to "split" the word
    ,, centered second line

    EDIT:

    BTW, my res is 1280 x 1024, Win 10.

    Spoo
    Last edited by Spooman; Jun 9th, 2017 at 05:38 PM.

  8. #8
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: SSTab, are you crazy?

    I would say it is the extra large fonts that is the source of the issue.
    You likely need to make the tab larger or the font smaller

  9. #9

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    Thanks to everybody that took the time to run the sample project.
    So far it seems that the issue only happens to me.

    I changed to standard fonts and the issue still happens.
    I also changed to 96 DPI (100%), removed the Windows theme and set it to classic Windows, but I got the same result:

    Name:  96DPIStandardFontsNoTheme.jpg
Views: 1436
Size:  29.9 KB

    About changing the font, it only get fixed when the font is small enough to get all the text to fit in a single line (tested with Arial and MS Sans Serif).

    What is the TabCtl32.Ocx file version that you have?
    Mine is: version 6.1.98.16 of March 24, 2009.
    File date time is: 02/16/2010 3:22 PM
    File size: 216 KB (221.504 bytes)

    I have SP6 installed and the Cumulative Update of 08/16/2012 (VB60SP6-KB2708437-x86*.msi)

  10. #10
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: SSTab, are you crazy?

    Just move to the TabStrip instead.

    As part of the system Common Controls it themes to fit the OS instead of looking like some refugee from a Windows 3.1 program.

  11. #11
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: SSTab, are you crazy?

    Quote Originally Posted by Eduardo- View Post
    What is the TabCtl32.Ocx file version that you have?
    Mine is: version 6.1.98.16 of March 24, 2009.
    File date time is: 02/16/2010 3:22 PM
    File size: 216 KB (221.504 bytes)
    Version 6.0.81.69
    6/24/1998

    SP6 Installed, no Cumulative update installed

    Correction:

    Version 6.1.97.82
    3/8/2004

    I was looking on the wrong drive before. The one mentioned at top has no SP installed.

    Name:  Image1.jpg
Views: 1434
Size:  16.2 KB
    Last edited by DataMiser; Jun 9th, 2017 at 09:01 PM.

  12. #12

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    Quote Originally Posted by dilettante View Post
    Just move to the TabStrip instead.

    As part of the system Common Controls it themes to fit the OS instead of looking like some refugee from a Windows 3.1 program.
    I prefer the SSTab.
    Reasons:
    1) Less code to set up.
    2) WYSWYG
    3) Order to have the controls at design time.

    Cons: no Windows theme.

    I have the pending task (may be forever) of to make an SSTab direct replacement able to display with the Windows theme.

    Krool is already replacing most of the controls, may be some day he also wants to make the SSTab.
    Last edited by Eduardo-; Jun 9th, 2017 at 09:10 PM.

  13. #13
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: SSTab, are you crazy?

    Sounds like the cumulative update may be the culprit here.
    There have been several warnings related to those updates advising to not install them.

  14. #14

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    Quote Originally Posted by DataMiser View Post
    Sounds like the cumulative update may be the culprit here.
    There have been several warnings related to those updates advising to not install them.
    Yes, it seems so.

    I know that there were one or more updates that were buggy.
    To my understanding, the recomendation was to install just that one after the SP6.
    Now I don't remember who said that, probably it was in the microsoft.public.vb.general.discussion newsgroup.

    May be I should open a new thread to discuss (and ask) whether to install or not to install that update.

  15. #15
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,206

    Re: SSTab, are you crazy?

    I would say that you should have SP6 installed but not any of the later updates.

  16. #16

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    Quote Originally Posted by DataMiser View Post
    I would say that you should have SP6 installed but not any of the later updates.
    The thing is that I've been using it (that update) for several years already, without any issue that I'm aware of (other than this one now), and starting now using just SP6 I'm not sure if that will introduce any bug or change in behavior to the programs that I make newer versions of.

  17. #17

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    About the SStab issue I "fixed" it changing its Style to property page like.
    It is not what I wanted, but now it displays the text correctly (all in one line, whithout wrapping).

  18. #18
    Fanatic Member Spooman's Avatar
    Join Date
    Mar 2017
    Posts
    868

    Re: SSTab, are you crazy?

    Eduardo

    Just out of curiosity, what happens if you "force" the split with a vbCrLF"

    Code:
    Caption = "configuracion" & vbCrLf & "de pagina"
    Spoo

  19. #19
    Fanatic Member Spooman's Avatar
    Join Date
    Mar 2017
    Posts
    868

    Re: SSTab, are you crazy?

    BTW, regarding ,,

    Quote Originally Posted by Eduardo- View Post
    I prefer the SSTab.
    Reasons:
    1) Less code to set up.
    2) WYSWYG
    3) Order to have the controls at design time.
    I haven't used TabStrip or Frame controls, but I can think of 2 other Pros:

    4) It is a container ,, TabStrip is not
    5) Look and feel .. it "looks" like a tab.

    Name:  sstab3.jpg
Views: 1332
Size:  10.7 KB


    Spoo
    Last edited by Spooman; Jun 10th, 2017 at 09:58 AM.

  20. #20

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    Quote Originally Posted by Spooman View Post
    Eduardo

    Just out of curiosity, what happens if you "force" the split with a vbCrLF"

    Code:
    Caption = "configuracion" & vbCrLf & "de pagina"
    Spoo
    I had tried that, it shows a square.
    Last edited by Eduardo-; Jun 10th, 2017 at 04:50 PM.

  21. #21

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    Quote Originally Posted by Spooman View Post
    BTW, regarding ,,



    I haven't used TabStrip or Frame controls, but I can think of 2 other Pros:

    4) It is a container ,, TabStrip is not
    5) Look and feel .. it "looks" like a tab.

    Name:  sstab3.jpg
Views: 1332
Size:  10.7 KB


    Spoo
    Yes.

  22. #22
    Fanatic Member Spooman's Avatar
    Join Date
    Mar 2017
    Posts
    868

    Re: SSTab, are you crazy?

    Quote Originally Posted by Eduardo- View Post
    I had tryed that, it shows a square.
    Boo ..
    I thought that might have a chance.

    Spoo

  23. #23
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,656

    Re: SSTab, are you crazy?

    Quote Originally Posted by Eduardo- View Post
    I prefer the SSTab.
    Reasons:
    1) Less code to set up.
    2) WYSWYG
    3) Order to have the controls at design time.

    Cons: no Windows theme.

    I have the pending task (may be forever) of to make an SSTab direct replacement able to display with the Windows theme.

    Krool is already replacing most of the controls, may be some day he also wants to make the SSTab.
    Krools controls have a tabstrip control that uses the common controls tab *and* doesn't have your 3 concerns. The 'windows theme' you cite is more important than you suggest too because of DPI and other issues. SSTab is really not something that should be used these days, especially with Krool's tab control just as easy to use.

  24. #24
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    10,910

    Re: SSTab, are you crazy?

    I'll throw my two-cents in just for grins.

    Personally, I love the SSTab control, specifically because it's so WYSIWYG. And, for me, it's a fairly bullet-proof control. As can be seen in form pics in other threads, I make frequent use of it. I will admit that I try to keep my tab captions short enough to fit on one line, so I haven't really seen the problems that Eduardo is having.

    I've thought many times of using a combination of the PictureBox and the TabStrip to make a WYSIWYG tabbed custom control out of them. It doesn't seem terribly difficult. I just have never taken the time to do it.

    The only problem I've found with the SSTab control is that it occasionally gets a bit confused about TabStops, especially when you have containers on the different tab-bodies. Here's a little class I always use when I'm using the SSTab control that fixes that problem:

    Code:
    
    Option Explicit
    '
    Dim WithEvents tabCtl As SSTab
    Dim frm As Form
    Dim TabStops() As Boolean
    '
    ' A primary purpose of this fix is to correctly control the tab stops.
    ' To make the appearance of tabs, the SSTab control simply moves the controls out of view.
    ' An artifact of this approach is that the controls are still able to get the focus when the
    ' user uses the TAB key.  The following code corrects this problem by appropriately turning
    ' on and off the TabStop properties of the controls as the user tabs from one tab to another.
    '
    ' Another problem has to do with ComboBoxes.  When changing to a new tab, dropdown comboboxes
    ' will have their text selected.  The combobox will not have the focus, but their text will be
    ' selected.  The primary problem with this is that it right-justifies the text when there is more
    ' text than will fit in the textbox portion of the combobox, and this is confusing to users.
    ' This problem is corrected in the following code.
    '
    
    Friend Sub SetTabControl(TheTabControl As SSTab, TheForm As Form)
        ' Call this in the form load event.
        Dim ctl As Control
        Dim Ptr As Long
        '
        Set tabCtl = TheTabControl
        Set frm = TheForm
        '
        ' Store the true value of the TabStops.
        ReDim TabStops(0 To frm.Controls.Count - 1)
        ' Not all controls have TabStop property, so we must set error trapping.
        On Error Resume Next
            For Ptr = 0 To frm.Controls.Count - 1
                TabStops(Ptr) = frm.Controls(Ptr).TabStop
            Next Ptr
        On Error GoTo 0
    End Sub
    
    Friend Sub SetTabStopsAccordingly()
        ' Call this in the form activate event.
        ' After this first call, it will automatically be called when the tabs change.
        Dim ctl As Control
        Dim ctlTheControlOrContainer As Control
        Dim ItsOnTheTabControl As Boolean
        Dim Ptr As Long
        '
        For Ptr = 0 To frm.Controls.Count - 1
            Set ctl = frm.Controls(Ptr)
            Set ctlTheControlOrContainer = ctl ' The control might be on a container that's on the SSTab, rather than directly on the SSTab.
            Do
                Select Case True
                Case TypeOf ctlTheControlOrContainer.Container Is SSTab
                    ItsOnTheTabControl = True
                    Exit Do ' The way out.
                Case TypeOf ctlTheControlOrContainer.Container Is Form
                    ItsOnTheTabControl = False
                    Exit Do ' The way out.
                End Select
                Set ctlTheControlOrContainer = ctlTheControlOrContainer.Container ' Must deal with controls nested deeper than the SSTab control.
            Loop
            If ItsOnTheTabControl Then
                ' Not all controls have TabStop property, so we must set error trapping.
                On Error Resume Next
                    If ctlTheControlOrContainer.Left >= 0 Then
                        ctl.TabStop = TabStops(Ptr) ' If it's showing, restore the original TabStop value.
                        ' Must also fix the problem with combo boxes having an internal focus set.
                        ctl.SelStart = 0
                        ctl.SelLength = 0
                    Else
                        ctl.TabStop = False
                    End If
                On Error GoTo 0
            End If
        Next Ptr
    End Sub
    
    Private Sub tabCtl_Click(PreviousTab As Integer)
        SetTabStopsAccordingly
    End Sub
    
    Private Sub tabCtl_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
        ' This allows other controls to close up when user click off.
        ' The problem is that clicking into the body of the tab control does NOT cause change in focus.
        ' The control with the focus keeps it, and it may not close up as typically happens when clicking on dead space of a form.
        ' You may also want to consider placing this "SetFocus" code on the labels on the tabs.  This is NOT automatically done
        ' because the programmer may want to use a label click for other purposes.
        tabCtl.SetFocus
    End Sub
    
    
    I've also got code worked out that allows you to dynamically (during runtime) change the tab that any particular control is on. It's in the codebank.

    All The Best,
    Elroy

    EDIT1: If you intend to use the above class, the easiest way is to throw that code into a CLS module, then declare that module as something like this (Dim oSSTabFix As New Class1), and then call it as instructed in the comments. It should self-destroy when your form closes it's Code/COM object.

    EDIT2: Very quickly, here's how I use it. Let's say the above class is named "clsFixTabCtl". In that case, I'd have the following line at module level in any form that had SSTab:

    Code:
    
    Dim oFixTabControl As New clsFixTabCtl
    
    And then in Form_Load, I'd have:

    Code:
    
    oFixTabControl.SetTabControl tabSomeSSTabControl, Me
    
    And then in Form_Activate, I'd have:

    Code:
    
    oFixTabControl.SetTabStopsAccordingly
    
    And that's it. After that, the SSTab control works perfectly.
    Last edited by Elroy; Jun 16th, 2017 at 08:23 AM.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

  25. #25
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: SSTab, are you crazy?

    Don't use PictureBox with TabStrip, create UserControls as panels.

    The bonus is that you pull tons of logic out of the client Form into separate modules. This reduces the rat's nest and makes your programs far easier to maintain.

    SSTab is a refugee from VB 3 and 640x480 monitors.

  26. #26

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    Quote Originally Posted by fafalone View Post
    Krools controls have a tabstrip control that uses the common controls tab *and* doesn't have your 3 concerns.
    I don't know about Krool's tabstrip control, but AFAIK he makes direct replacemente of the controls, so his tabstrip I presume would work in the same way of the original, having the same issues.
    I don't have time now to take a look, I'll do it in some other time.

    Quote Originally Posted by fafalone View Post
    The 'windows theme' you cite is more important than you suggest too because of DPI and other issues.
    The windows theme has nothing to do with DPI but with the look, also AFAIK.

    The original SStab doesn't have issues with DPI settings that I can remember.

    Quote Originally Posted by fafalone View Post
    SSTab is really not something that should be used these days, especially with Krool's tab control just as easy to use.
    Other than it doesn't support the Windows theme, that I don't think it is so important as you do, I don't see many issues.
    It doesn't look bad, changing the fonts from MS Sans Serif to a TrueType like Arial or Microsoft Sans Serif, that is what I do for the whole program.

    On the other side, just applying the Windows theme, the tabs controls doesn't look much more modern either.

    I'm sorry I disagree in everyting you have said.

  27. #27

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    Quote Originally Posted by Elroy View Post
    I will admit that I try to keep my tab captions short enough to fit on one line, so I haven't really seen the problems that Eduardo is having.
    I also do, but in Spanish the texts are frequently longer than in English.
    For example:
    English: Page Setup
    Spanish: Configuración de página

  28. #28

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    I recently tried to check how I could do the SSTab replacement, and I found a problem:

    The SStab, for being as it is, it must be possible to click in the tabs at design time.
    So it means that the control must run at design time.

    To run an UserControl at design time, there is a property EditAtDesignTime that must be set to True.
    But, even with that, for the control to run at design time, the developer needs to right click on the control and select "Edit" from the context menu, something not desirable at all.

    I didn't find a way to overcome that.
    It may not be possible to write a direct replacement of the SSTab in VB6.

    Edit:
    I didn't find a way to force this editing mode.
    Last edited by Eduardo-; Jun 15th, 2017 at 12:38 AM.

  29. #29
    Fanatic Member Spooman's Avatar
    Join Date
    Mar 2017
    Posts
    868

    Re: SSTab, are you crazy?

    Quote Originally Posted by Eduardo- View Post
    I had tried that, it shows a square.
    Could you post an image of this situation.

    Spoo

  30. #30

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    Quote Originally Posted by Spooman View Post
    Could you post an image of this situation.

    Spoo
    Name:  TabCaption_with_vbCrLf.jpg
Views: 1023
Size:  17.3 KB

  31. #31
    Fanatic Member Spooman's Avatar
    Join Date
    Mar 2017
    Posts
    868

    Re: SSTab, are you crazy?

    Eduardo

    Man, that IS weird .. boo
    And it is not what I encountered when I used vbCrLF on Tab 2 in my post #7.

    What happens if you increase .TabHeight?

    Also, what happens if you just use "standard" letters .. ie, no accents, no cidellas
    (I'm not sure of the terminology, but I guess that it is "language" related and has
    to do with specifying UniCodes).

    Spoo
    Last edited by Spooman; Jun 15th, 2017 at 02:21 AM.

  32. #32

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    Quote Originally Posted by Spooman View Post
    Eduardo

    Man, that IS weird .. boo

    And it is not what I encountered when I used vbCrLF on Tab 2 in my post #7.
    What happens if you increase .TabHeight?

    Spoo
    Name:  TabCaption_with_vbCrLf2.jpg
Views: 1261
Size:  18.9 KB

  33. #33
    Fanatic Member Spooman's Avatar
    Join Date
    Mar 2017
    Posts
    868

    Re: SSTab, are you crazy?

    OK ,, no luck there.

    How about the "language" issue?
    Could you post the code frag that enables that .. I've never done that before.

    EDIT ..

    Doing a little bit of checking up on Help, I see that this may be referred to
    as double-byte character set (DBCS), as opposed to ANSI.

    Actually, I wonder if that is why you are getting 2 squares.

    I found this info in Help .. don't know if it is germane ..
    Processing Files That Use Double-Byte Characters


    In locales where DBCS is used, a file may include both double-byte and single-byte characters. Because a DBCS character is represented by two bytes, your Visual Basic code must avoid splitting it. In the following example, assume Testfile is a text file containing DBCS characters.

    ,,,

    When you use a String variable with Input or InputB to read bytes from a binary file, Unicode conversion occurs and the result is incorrect.

    Spoo
    Last edited by Spooman; Jun 15th, 2017 at 02:50 AM.

  34. #34
    PowerPoster ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    3,129

    Re: SSTab, are you crazy?

    Hello Eduardo,

    working with the Tabstrip isn't that much work to Setup


    here a Sample with Tabstrip and Frames
    Sample Tabstrip.zip

    regards
    Chris

  35. #35

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    Quote Originally Posted by Spooman View Post
    OK ,, no luck there.

    How about the "language" issue?
    Could you post the code frag that enables that .. I've never done that before.
    I don't know what you mean. There is no code at all, other than the line for the test you've requested:

    Code:
     sst1.TabCaption(0) = "Configuración" & vbCrLf & "de página"
    Quote Originally Posted by Spooman View Post
    EDIT ..

    Doing a little bit of checking up on Help, I see that this may be referred to
    as double-byte character set (DBCS), as opposed to ANSI.

    Actually, I wonder if that is why you are getting 2 squares.

    I found this info in Help .. don't know if it is germane ..


    Spoo
    That's has nothing to do with Spanish, Spanish uses just ANSI, that means one byte per character.

    And without the accent marks it is the same:

    Name:  SStabbug_en.jpg
Views: 1139
Size:  28.7 KB

  36. #36
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,656

    Re: SSTab, are you crazy?

    Well you're free to disagree all you want, but I'll make my case with a picture of my most recent tabstrip



    Last edited by fafalone; Jun 15th, 2017 at 06:46 AM.

  37. #37

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    Quote Originally Posted by fafalone View Post
    Well you're free to disagree all you want, but I'll make my case with a picture of my most recent tabstrip



    It doesn't seem very special to me.
    In fact, what that image confirms is that it has the Windows theme applied.

    But it means nothing about what I've said:

    Quote Originally Posted by Eduardo- View Post
    I prefer the SSTab.
    Reasons:
    1) Less code to set up.
    2) WYSWYG
    3) Order to have the controls at design time.
    I think you don't know what that means.
    Last edited by Eduardo-; Jun 15th, 2017 at 12:01 PM.

  38. #38
    PowerPoster ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    3,129

    Re: SSTab, are you crazy?

    Hello Eduardo,

    in my last post I made a sample with Tabstrip an Frames. I isn't that much work to set the Tabstrip up

    Code:
    Private Sub Form_Load()
      Dim i As Long
       Dim x As Single
       Dim y As Single
          With TabStrip1
             .Width = 8000
             .Height = 6500
             .Top = 1150
             .MultiRow = True
             .Left = (Me.ScaleWidth - .Width) / 2
             'sort the Frames to Tabstrip
             For i = 0 To Frame1.UBound
                Frame1(i).Height = 6000
                Frame1(i).Width = 7500
                Frame1(i).Left = .Left + (.Width - Frame1(i).Width) / 2
                Frame1(i).Top = .Top + 210 + (.Height - 210 - Frame1(i).Height) / 2
                Frame1(i).Visible = False
                Frame1(i).BorderStyle = 1
             Next
          End With
          For i = 0 To Label1placeholder.UBound
             Label1placeholder(i).Visible = False
          Next
          ' show 1. Frame
          Frame1(0).Visible = True
    End Sub
    
    Private Sub TabStrip1_Click()
     Dim i As Long
       
          For i = 1 To Frame1.UBound
             Frame1(i).Visible = False
          Next
          
          i = TabStrip1.SelectedItem.Index
          Frame1(i - 1).Visible = True
          
          If i = 2 Then
            MsgBox "you clicked Tab2"
          Else
            ' cmdFotoshow.Visible = False
            End If
    End Sub


    regards
    Chris

  39. #39

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    I wonder how does people do at design time with TabStrip in cases, for example:

    A form that is almost the size of your current developing screen.
    You have a TabStrip of, let's say 6 tabs, but may be less that occupies almost all form's size.

    How do you manage to place all those Frames or PictureBoxes that are containers of each tab of the TabStrip on the form?

    Don't tell me that you use a SStab to store them, just for the design time... LOL
    Last edited by Eduardo-; Jun 15th, 2017 at 04:29 PM.

  40. #40

    Thread Starter
    PowerPoster
    Join Date
    Feb 2017
    Posts
    5,672

    Re: SSTab, are you crazy?

    This thread is encouraging me to write a real SSTab replacement.
    I think the problem that I outlined in the message #28 could be solved with subclassing.

    Update February 2018: For anyone reading this thead, here is the replacement.
    Last edited by Eduardo-; Feb 6th, 2018 at 08:02 AM.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width