Skip to content
Tcl Source Code Artifact [2b7aad24f7]
Login

Artifact [2b7aad24f7]

Artifact 2b7aad24f7fd10d4f62882bdbf568c238ef091b0:

Ticket change [2b7aad24f7] - Ticket [420096ffffffffff|420096ffff] <i>Bug with mixing geometery managers</i> status still Closed with 6 other changes by s_a_white on 2001-05-01 16:14:15.
D 2001-05-01T16:14:15
J closedate 2001-05-01T09:14:15
J closer s_a_white
J icomment Logged\sIn:\sYES\s\nuser_id=59929\n\nHi,\n\nHeres\sa\ssimplified\sversion\sof\sthe\sactual\scode,\sI'm\ssure\sI\ncould\sreproduce\sthe\sproblem\sin\snormal\stcltk,\sbut\syour\sright\nthe\sabove\sdosen't\swork.\s\sWarring\smanagers\sit\sno\sdoubt\sthe\ncause\s:(.\s\sThe\sproject\sI'm\sworking\son\sdoes\showever\shave\sa\nlot\sof\smixing\sdepending\son\swhats\seasier\sfor\sthat\spart\sof\sthe\nscreen\sand\swho\swrote\sthe\sparticular\ssection\sof\sthe\scode.\s\nCopy\sthis\sto\sa\sfile\sand\srun\sit\sin\sone\sgo.\n\npackage\srequire\sIwidgets\s3\n\n####################################################################################################################\n#\sNamespace/Class\sdefinitions\n####################################################################################################################\nclass\sChdwin\s{\n\s\s\s\sinherit\sitk::Widget\n\n\s\s\s\sconstructor\s{args}\s{}\n\n\s\s\s\s#\sA\scustom\swindow.\sYou\smust\screate\sa\stitle\sand\sposition\nthe\sbuttons.\n\s\s\s\sitk_option\sdefine\s-custom\s\s\s\s\s\s\s\s\s\scustom\s\s\s\s\s\s\s\s\s\nCustom\s\s\s\s\s\s\s\s\s\s0\n}\n\n\nproc\s::chdwin\s{{args\s""}}\s{\n\s\s\s\suplevel\s::Chdwin\s$args\n}\n\n\n#\sObject\sConstructor\nbody\s{Chdwin::constructor}\s{{options\s""}\sargs}\s{\n\s\s\s\s#\sCreate\sa\splace\sfor\sthe\suser\sto\splace\shis\sown\sbits\n\s\s\s\s#\sMust\sbe\screated\sbefore\sbutton\sbox!\n\s\s\s\sitk_component\sadd\scontents\s{\n\s\s\s\s\s\s\s\sframe\s$itk_interior.contents\n\s\s\s\s}\s{\n\s\s\s\s\s\s\s\skeep\s-background\s-width\s-height\n\s\s\s\s}\n\n\s\s\s\s#\sCreate\sbuttons\n\s\s\s\sset\sbbox\s$itk_interior.bbox\n\s\s\s\sframe\s$bbox\n\n\s\s\s\s#################################\n\s\s\s\s#\sFix\sfor\sbutton\shightlight\sbug\s#\n\s\s\s\sframe\s\s$bbox.resizeB\s\s\s-highlightthickness\s1\n\s\s\s\sframe\s\s$bbox.menuB\s\s\s\s\s-highlightthickness\s1\n\s\s\s\sframe\s\s$bbox.closeB\s\s\s\s-highlightthickness\s1\n\s\s\s\s#################################\n\s\s\s\sbutton\s$bbox.menuB.b\s\s\s-width\s11\s-height\s9\s-borderwidth\n2\s-relief\sraised\s\\\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s-padx\s0\s-pady\s0\n-highlightthickness\s0\n\s\s\s\sbutton\s$bbox.resizeB.b\s-width\s11\s-height\s9\s-borderwidth\n2\s-relief\sraised\s\\\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s-padx\s0\s-pady\s0\n-highlightthickness\s0\n\s\s\s\sbutton\s$bbox.closeB.b\s\s-width\s11\s-height\s9\s-borderwidth\n2\s-relief\sraised\s\\\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s-padx\s0\s-pady\s0\n-highlightthickness\s0\n\n\s\s\s\s#\sSetup\sbbox\sto\scontain\sall\sour\sbuttons\n\s\s\s\sgrid\s$bbox.menuB\s\s\s-column\s2\s-row\s0\n\s\s\s\sgrid\s$bbox.menuB.b\n\s\s\s\sgrid\s$bbox.resizeB\s-column\s1\s-row\s0\n\s\s\s\sgrid\s$bbox.resizeB.b\n\s\s\s\sgrid\s$bbox.closeB\s\s-column\s0\s-row\s0\n\s\s\s\sgrid\s$bbox.closeB.b\n\n\s\s\s\spack\s\s$itk_component(contents)\s-side\sbottom\s-fill\sboth\n-expand\strue\n\s\s\s\spack\s\s$bbox\s\s-side\sleft\s-fill\sy\n\s\s\s\seval\sitk_initialize\s$options\s$args\n}\n\n\nconfigbody\s{Chdwin::custom}\s{\n\s\s\s\sif\s($itk_option(-custom))\s{\n\s\s\s\s\s\s\s\spack\s$itk_interior.bbox\s\s-in\s$itk_interior.contents\n-side\stop\s-anchor\sne\s-fill\snone\n\s\s\s\s}\selse\s{\n\s\s\s\s\s\s\s\spack\s$itk_interior.bbox\s\s-in\s$itk_interior\s-side\nleft\s\s\s-fill\sy\n\s\s\s\s}\n}\n\n\n#\sCustom\smoves\sthe\sbutton\sbox\sinto\sthe\scontents\sto\sthe\suser\n#\scan\sbuild\sscreens\saround\sit.\nchdwin\s.c\s-custom\s1\ngrid\s.c\s-sticky\snsew\n\n\n#\sGriding\shere\skills\stcl,\sbut\sI\sreally\swanted\sthe\scontents\n#\sof\sthe\schild\swindow\sto\sbe\sgrided.\nbutton\s.c.contents.b\ngrid\s\s\s.c.contents.b\n\n\nAs\sfor\syour\sthe\spropagate\sI\swasn't\ssuggesting\smoving\sthe\nmeaning\sof\spropagate\sto\sthe\schildren.\s\sIt's\sjust\sthe\ssince\n.f\swas\sgrided\sit\sseems\sto\smake\ssense\sto\sset\sgrid\spropagate\n.f\s0\ssince\sit's\sthe\sgridder\sthats\sholding\sthe\sgeometery\ninformation.\s\sSetting\spack\spropagate\s.f\s0\sis\sa\slittle\nconfusing\sbecause\sthe\spacker\sdoes\snot\sholding\sany\sdetails\nabout\sthe\swidget\s.f.\s\sHence\swhy\sa\ssuggestion\sof\swhen\syou\npack\s.f.b,\sthe\spacker\swould\ssay\sI\smust\scheck\sthe\spropagate\nfor\s.f.\s\sThen\sit\scould\ssay,\shang\son,\sI\sdon't\sown\s.f\sbut\sthe\ngridder\sdoes,\sperhaps\sI\sshould\sask\sthe\sgridder\sfor\sthe\npropagate...\n\nIn\sgerenal\suse\sthough\sI\shave\sfound\sno\sreason\sto\sbe\sable\sto\nset\spropagate\sindependently\sfor\sgrid\sand\spack.\s\sWhen\smixing,\nwe\sjust\sset\sthem\sboth\sto\sthe\ssame\svalue\sto\savoid\sproblems.\s\nIf\sthis\sapproach\swas\scommon\sperhaps\sa\ssingle\spropagate\scould\nbe\sheld\sbe\sthe\swidget,\sand\stherefore\sbe\scommon\sbetween\nbetween\sall\smanagers.\s\sThe\sgrid/pack\spropagate\swould\sthen\sbe\na\sway\sto\sset\sthis\scommon\svalue.\n\n
J login s_a_white
J mimetype text/plain
J username s_a_white
K 420096ffffffffffffffffffffffffffffffffff
U s_a_white
Z 0c40e88546a710fc71155a56ff3d0f9b