Resolved 1.7.5.5 tabview bug
#2
I have not been able to get tabview working as it should. I guess my c++ and understanding of the tabview code in Haiku isn't good enough.

As a work-around, I have am making a tabview in yab as a library. I have tested it in your code as a replacement for yabs built-in tabview and it seems to be working.

[Image: tabtest.png]
Code:
screenWidth = peek("desktopwidth")
screenHeight = peek("desktopheight")
import yabtab


window open screenWidth/2-200, screenHeight/2-200 to screenWidth/2+200, screenHeight/2+200, "MainWindow", "Test"

    VIEW 0,0 TO 400,320, "BackgroundView","MainWindow"
    x=yabtab( 5,2 , 395,300,"Test","top","BackgroundView")
    //TABVIEW 5,2 TO 395,300, "Test", "top", "BackgroundView"
        view$=tabadd$("Test", "Tab1")
        //TABVIEW ADD "Test",  "Tab1"
            BUTTON 5,5 TO 105,25, "BT:Hui", "Hui",view$
        view1$=tabadd$("Test", "Tab2")
        //TABVIEW ADD "Test",  "Tab2"
        
        

    BUTTON 5,350 TO 100,375, "BT:Remove", "Remove", "MainWindow"
    BUTTON 105,350 TO 200,375, "BT:Add", "Add", "MainWindow"

dim part$(1)

inloop = true
while(inloop)
    msg$ = message$
    
    if (split(msg$, part$(), ":|") > 2) then
        PartOne$=part$(1)
        PartTwo$ = part$(2)
        PartThree$ = part$(3)
    fi
    
    if (split(msg$, part$(), ":|") > 3) then
        PartFour$ = part$(4)
    fi

    if (msg$ <> "")  print msg$
    switch msg$
    
    //Cases
    
    case "BT:Add|"
        //VIEW 0,0 TO 400,320, "BackgroundView","MainWindow"
        x=yabtab( 5,2 , 395,300,"Test","top","BackgroundView")
    //TABVIEW 5,2 TO 395,300, "Test", "top", "BackgroundView"
        view$=tabadd$("Test", "Tab1")
        //TABVIEW ADD "Test",  "Tab1"
            BUTTON 5,5 TO 105,25, "BT:Hui", "Hui",view$
        view1$=tabadd$("Test", "Tab2")
        //TABVIEW ADD "Test",  "Tab2"
        
            
        break

    case "BT:Remove|"
        //VIEW REMOVE "BackgroundView"
         if VIEW GET "containerTest","exists" yabtabremove("Test")
        break
    
    case "MainWindow:_QuitRequested|"
        WINDOW CLOSE "MainWindow"
        break


    default:
    
    end switch
    
    if VIEW GET "containerTest","exists" checktabclick()        
    if(window count<1) inloop = false
    sleep 0.1    
    wend

So far the only option is top, and the library needs to be reformatted to remove all my troubleshooting stuff, but it works!
Reply


Messages In This Thread
Resolved 1.7.5.5 tabview bug - by lelldorin - 02-23-2018, 04:17 PM
RE: 1.7.5.5 tabview bug - by bbjimmy - 03-09-2018, 03:05 PM
RE: 1.7.5.5 tabview bug - by bbjimmy - 03-15-2018, 12:04 PM
RE: 1.7.5.5 tabview bug - by bbjimmy - 03-19-2018, 11:46 AM
RE: 1.7.5.5 tabview bug - by bbjimmy - 04-15-2018, 08:42 PM
RE: 1.7.5.5 tabview bug - by bbjimmy - 04-20-2018, 08:50 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)
Free Web Hosting