On 09/16/2017 02:47 PM, fredvs wrote: > > With a tabed form, when other tabs are active, it is not possible to select > a other tab. > > See video: > msetabprob.mp4 > <http://mseide-msegui-talk.13964.n8.nabble.com/file/t2/msetabprob.mp4> > That could be a problem: " procedure tdrumsfo.ontimertick(const Sender: TObject); [...] application.lock(); label2.visible := true;
if (posi = 1) or (posi = 9) then begin label3.visible := true; label4.visible := false; end else if (posi = 5) or (posi = 13) then begin label3.visible := false; label4.visible := true; end; " The parent of the labels is a tdockpanel which triggers a layout recalculation of the whole docking stack because hiding/showing of a widget can change the client size of the parentwidget. I suggest to replace tdockpanel4 by a tgroupbox. I see more tdockpanels in the application where a tgroupbox is more appropriate. BTW, application.lock()/unlock() is not necessary in ttimer.onexecute events, they run in main thread context. Another problem is the label font setting " if (posi = 5) then begin alab2[1].font.color := cl_white; alab2[0].font.color := cl_black; alab2[2].font.color := cl_black; alab2[3].font.color := cl_black; [...] " some of the labels have font = <parent> which means that you set the properties of the parent or default font which again triggers layout calculation. " if (posi = 1) or (posi = 9) then @@ -754,6 +754,7 @@ var ordir : string; spcx, spcy, posx, posy, ax : integer; lib1, lib2, lib3, lib4 : string; + i1: int32; begin // visible := false; @@ -846,6 +847,9 @@ begin alab2[1] := tlabel2; alab2[2] := tlabel3; alab2[3] := tlabel4; + for i1:= 0 to high(alab2) do begin + alab2[i1].createfont(); + end; " fixes the problem. After above changes tab selection with running drums works for me, see attachment. A hint: the program crashes if compiled with -gh (heaptrace) there seems to be a memory error somewhere. Martin
tabselect.patch.7z
Description: application/7z-compressed
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ mseide-msegui-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

