English
Forum

Strange Behavior when employment a Tab Controls

 

Dieter
Zornow
I have in my Program Problems a with Create("Bitmap" .... erstellte graphic according to tab view or To hide, have then time to that testing one Minimalbeispiel made and the behave itself utterly differently as in my Original. in the Original I get not cache. here becomes it first of all not displayed, though it the should. but yet clicking on The tab appear it then still. have then The request tested with TabChanged() getfocus() and Clicked(). thereby is another Merkwürdigkeit emerged. the TabControl sustain apparently never whom Fokus, because otherwise should in the Mainwindow my request attend. I can for hours clicking, the TabControl has none Fokus first if I on a tab twice hintereineinander click has it of there on whom Fokus.Clicked() and Tabchanged() react but too without Fokus in this Context shining XProfan according to mood To react, because The starting point was, I can The Bitmap not hide. here time one Testcode. I hope on The speedy are no Error drin.
CompileMarkSeparation
Def Show(1) ShowWindow(@&(1), 1)
Def Hide(1) ShowWindow(@&(1), 0)
var ende% = 0
cls
dialog()

Proc SetActiveTab

    Parameters Tab&,Index&
    SendMessage(Tab&,$1330,Index&, 0)

EndProc

PROC DIALOG

    var DLG& = CREATE("DIALOG",%Hwnd,"Neues Fenster",(%maxx/2 - 534/2),(%maxy/2 - 500/2),534,500)
    Var tc& = CREATE("TABCTRL",DLG&,"Tab 1",0003,0003,0520,0412)
    InsertTab(tc&,1,"Tab 2")
    InsertTab(tc&,2,"Tab 3")
    InsertTab(tc&,3,"Tab 4")
    var hpic& = Create("hSizedPic",-1,$WinPath+"\Angler.bmp",100,100,1)
    var bmp& = Create("BITMAP",dlg&,hpic&,10,35)
    var but& = Create("Button",dlg&,"Verstecke",10,250,100,25)
    setActivetab(tc&,0)
    show(bmp&)

    whilenot ende%

        waitinput

        If %key = 2

            ende% = 1

        elseif TabChanged(tc&)

        elseif getfocus(tc&)

        elseif clicked(tc&)

            case getfocus(tc&):Print "Focus"
            case getactivetab(tc&) = 0:show(bmp&)
            case getactivetab(tc&) = 1:hide(bmp&)
            case getactivetab(tc&) = 2:hide(bmp&)
            case getactivetab(tc&) = 3:show(bmp&)

        elseif Clicked(but&)

            Hide(bmp&)

        endif

    endwhile

    deleteobject hpic&
    end

endproc


Greeting

Dieter
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
08/15/08  
 




Jörg
Sellmeyer
means, if you The Bitmap on tc& plazierst, appear tappt im dunkeln too same and the Buttonabfrage must naturally not behind GetFocus(tc&) erfolgen. If one behind The Buttonabfrage again whom Focus on tc& setting, functions it too.
CompileMarkSeparation
 $H commctrl.ph
Def Show(1) ShowWindow(@&(1), 1)
Def Hide(1) ShowWindow(@&(1), 0)
var ende% = 0
cls
dialog()

Proc SetActiveTab

    Parameters Tab&,Index&
    SendMessage(Tab&,$1330,Index&, 0)

EndProc

PROC DIALOG

    var DLG& = CREATE("DIALOG",%Hwnd,"Neues Fenster",(%maxx/2 - 534/2),(%maxy/2 - 500/2),534,500)
    Var tc& = CREATE("TABCTRL",DLG&,"Tab 1",0003,0003,0520,0412)
    InsertTab(tc&,1,"Tab 2")
    InsertTab(tc&,2,"Tab 3")
    InsertTab(tc&,3,"Tab 4")
    var hpic& = Create("hSizedPic",-1,$WinPath+"\Angler.bmp",100,100,1)
    var bmp& = Create("BITMAP",tc&,hpic&,10,35)
    var but& = Create("Button",dlg&,"Verstecke",10,250,100,25)
    setActivetab(tc&,0)
    show(bmp&)

    whilenot ende%

        waitinput

        If %key = 2

            ende% = 1

        elseif TabChanged(tc&)

        elseif TabChanged(tc&)

        elseif clicked(tc&)

            case getfocus(tc&):Print "Focus"
            case getactivetab(tc&) = 0:show(bmp&)
            case getactivetab(tc&) = 1:hide(bmp&)
            case getactivetab(tc&) = 2:hide(bmp&)
            case getactivetab(tc&) = 3:show(bmp&)

        elseif Clicked(but&)

            Hide(bmp&)
            SetFocus(tc&)

        endif

    endwhile

    deleteobject hpic&
    end

../funzione-riferimenti/XProfan/endproc/'>endproc


i'd it though sooner so solve:
CompileMarkSeparation
 $H commctrl.ph
Def Show(1) ShowWindow(@&(1), 1)
Def Hide(1) ShowWindow(@&(1), 0)
var end% = 0
cls
dialog()

Proc SetActiveTab

    Parameters Tab&,Index&
    SendMessage(Tab&,$1330,Index&, 0)

ENDPROC

PROC DIALOG

    var DLG& = CREATE("DIALOG",%Hwnd,"Neues Fenster",(%maxx/2 - 534/2),(%maxy/2 - 500/2),534,500)
    Var tc& = CREATE("TABCTRL",DLG&,"Tab 1",0003,0003,0520,0412)
    InsertTab(tc&,1,"Tab 2")
    InsertTab(tc&,2,"Tab 3")
    InsertTab(tc&,3,"Tab 4")
    var hpic& = Create("hSizedPic",-1,$WinPath+"\anglers.bmp",100,100,1)
    var bmp& = Create("BITMAP",tc&,hpic&,10,35)
    var but& = Create("Button",dlg&,"Verstecke",10,250,100,25)
    setActivetab(tc&,0)
    show(bmp&)

    whilenot end%

        waitinput
        Case Clicked(tc&):ShowWindow(bmp&,(GetActivetab(tc&) = 0) Or (GetActivetab(tc&) = 3))

        If %key = 2

            end% = 1

        elseif TabChanged(tc&)

            here can one yet others things make

        elseif Clicked(but&)

            Hide(bmp&)
            SetFocus(tc&)

        endif

    endwhile

    deleteobject hpic&
    end

endproc

 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/15/08  
 




Dieter
Zornow
@Jörg,

thanks, in my Originalprogramm question so did i with Tabchanged() ex. the was only one Test with the Fokus. strange is already, that the TabControl first to one Double click whom Fokus sustain. to that second ought to the image on dlg& immediate attend, because Controls should of my opinion to not the TabControl. If one in my example with Tabchanged() abfragt appear it indeed but first to the Click on The Tabs. this is really everything very strange what about me can it I do not explain. i will hold always know, Why it itself so behave.
be but still on the search Why itself the image in my Originalprogramm alike where I it hinlege not hide can. i'll well everything change and each tab on one own Control lay, that I then total cache and display, because I have on each tab, with 6 Tabs, ca 17 Controls and Profan is too slow at create The nichtangezeigten same To hide, so that everything flackert at construction.

Greeting

Dieter
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
08/16/08  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

828 Views

Untitledvor 0 min.
Jörg Sellmeyer06/23/20
Torben Nissen05/04/20
Peter Max Müller04/16/15
thb04/25/12

Themeninformationen

this Topic has 2 subscriber:

Dieter Zornow (2x)
Jörg Sellmeyer (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie