Jump to content
Sign in to follow this  
Thatsgreat2345

Tab Not Refreshing

Recommended Posts

Thatsgreat2345

I am using _GuictrlTab_SetCurSel and when I set it a specific tab it doesn't refresh the tab so the controls on that tab are showing. Just curious what I need to send to have it refresh/redraw the original controls. I've never really used Guictrlsendmsg so I don't know if that is right or not

here is an example

#include <GUIConstants.au3>
#include <GuiTab.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 193, 125)
$Tab = GUICtrlCreateTab(24, 40, 561, 353)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$Tab1 = GUICtrlCreateTabItem("Test1")
$Label1 = GUICtrlCreateLabel("FIRST", 120, 144, 35, 17)
$Tab2 = GUICtrlCreateTabItem("Test2")

GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Select
        Case $nMsg = $GUI_EVENT_CLOSE
            Exit
        Case _GUICtrlTab_GetCurSel($Tab) = 1
            
            _GUICtrlTab_SetCurSel($Tab,0)
                             GUICtrlSendMsg($Tab1,$TCN_SELCHANGE,-1,-1)
            GUICtrlSendMsg($tab1,$TCN_SELCHANGING,-1,-1)
    EndSelect
WEnd
Edited by Thatsgreat2345

Share this post


Link to post
Share on other sites
Thatsgreat2345

HAHAH thanks, I could of swore i tried focus and it wasn't working thus why I switched.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×