Re: setVisible on tab pages

new topic     » goto parent     » topic index » view thread      » older message » newer message

>The tab page is not a real control. The way it works is that when you select a
>tab
>page, win32lib hides all the controls it knows are on the other tabs, then
>makes
>visible all the controls it knows are on the tab you selected. If your
>application
>plays with the visiblity outside of the normal process, you must also take into
>
>consideration the tab page status. 
>
>In other words, one of the criteria for making a control visible should be that
>its
>'parent' tab page is the currently selected tab page.
>
>Here is a function that may help. It returns 1 if the specified control is in
>the
>currently selected TabItem.
>
>}}}
<eucode>
> function IsTabItemVisible(integer theTabControl, integer theControl)
>  integer lIdx
>  sequence lKids
>  
>  lIdx = sendMessage( theTabControl, TCM_GETCURSEL, 0, 0)
>  if lIdx < 0 then
>    -- None selected
>    return 0
>  end if
>  lIdx += 1
>  
>  lKids = findChildren(theTabControl)
>  if length(lKids) < lIdx then
>    -- Should not happen.
>    return 0
>  end if
>  lCurrentTab = lKids[lIdx][1]
>  
>  if findParent(theControl) != lCurrentTab then
>      return 0
>  end if
>  return 1
>end function
></eucode>
{{{

>-- 
>Derek Parnell
>Melbourne, Australia
>irc://irc.sorcery.net:9000/euphoria

Derek, 

Hmm, makes it abit more complicated. I'll just have to implemend that
function (if you don't mind?), and combine it with a setHandler that
activates when the "General" page is clicked on ..

Thanks for the help, Derek.

Kenneth / ZNorQ.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu