Re: How to use XControls?

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

On Thu, 27 Jan 2005 16:21:11 -0800, Derek Parnell
<guest at rapideuphoria.com> wrote:
> Yes, I do see the smiley, but in any case, please RTM.

Sorry, about 2 minutes after posting that, I found the findParent(id) call.

> There may also be some special processing involved with TabItems. When you
> call findParent() on an id that is in a TabItem, Win32Lib returns the
> TabItem's id, but Microsoft does regard the TabItem as a real control. So
> you can't simply resize a TabItem, instead you need to resize the TabControl
> that the TabItem belongs to.
> 
> So if findParent() returns the id of a TabItem, you need to do an additional
> findParent() to get the TabControl's id.
> 
>    par = findParent(id)
>    if getControlInfo(par, CONTROLINFO_type) = TabItem then
>       par = findParent(par)
>    end if
>    setRect( par, newLeft, newTop, newWidth, newHeight, w32True )
> 
> Hope this helps.

Yes, that would work... did you read the other post I made about
troubles in Autosize? Specifically checking for TabItem seems like a
bit of a kludge, I don't suppose there's any way to test whether a
control needs to use the grandparent rather than parent?

I don't know anything about XControls, is it possible that this
problem would exist for any of the XControl types?


Sorry for the dig about win32lib... it's more my own laziness that is
the cause. blink

-- 
MrTrick

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

Search



Quick Links

User menu

Not signed in.

Misc Menu