knowledge-database (beta)

Current group: jrsoftware.toolbar2000

Re: @Jordan: Set TTBPopupWindow size

Re: @Jordan: Set TTBPopupWindow size  
Jordan Russell
 Re: @Jordan: Set TTBPopupWindow size  
Marko Binic
 Re: @Jordan: Set TTBPopupWindow size  
Marko Binic
 Re: @Jordan: Set TTBPopupWindow size  
Jordan Russell
 Re: @Jordan: Set TTBPopupWindow size  
Marko Binic
 Re: @Jordan: Set TTBPopupWindow size  
Marko Binic
From:Jordan Russell
Subject:Re: @Jordan: Set TTBPopupWindow size
Date:Tue, 14 Dec 2004 01:21:24 -0600
"Marko Binic" wrote in message
news:cpenn5$4b1$1@news.jrsoftware.org...
> Jordan I was hoping you can help me with this, you created the component.
> I'm making a custom palette component and chose to use TTBXPopupWindow as
> the ancestor, since it's derived from TCustomControl I thought it wouldn't
> give me any trouble, but I was wrong. I just can't find a way to set it's
> size.

To set the size, override the DoArrange method and return the desired size.

Check out the source code to TTBToolWindow (TB2ToolWindow.pas) for an
example.

--
Jordan Russell
From:Marko Binic
Subject:Re: @Jordan: Set TTBPopupWindow size
Date:Tue, 14 Dec 2004 14:14:11 +0100
Seems I spoke too soon. Now I know how to set the size of the window, but it
doesn't respond to messages like WMMouseMove, WMLButtonUP and WMKeyDown,
also when I do something in the MouseMove, MouseDown, MouseUp or KeyDown
nothing happends. How can I make it receieve and pass me the mouse and
keyboard messages like other TCustomControls?

Cheers

Marko
From:Marko Binic
Subject:Re: @Jordan: Set TTBPopupWindow size
Date:Mon, 20 Dec 2004 11:31:33 +0100
> How can I make it receieve and pass me the mouse and keyboard messages
> like other TCustomControls?

Well, is there a way to do this???

Marko
From:Jordan Russell
Subject:Re: @Jordan: Set TTBPopupWindow size
Date:Mon, 20 Dec 2004 12:25:11 -0600
"Marko Binic" wrote in message
news:cpmovb$nmi$1@news.jrsoftware.org...
> Seems I spoke too soon. Now I know how to set the size of the window, but
it
> doesn't respond to messages like WMMouseMove, WMLButtonUP and WMKeyDown,
> also when I do something in the MouseMove, MouseDown, MouseUp or KeyDown
> nothing happends. How can I make it receieve and pass me the mouse and
> keyboard messages like other TCustomControls?

I just realized that you're talking about TTBPopupWindow, not
TTBToolWindow...

If you want to capture keyboard events at the "view" level you would have
to:

- Create a descendant class of TTBPopupWindow
- Create a descendant class of TTBView
- In your item class, override GetPopupWindowClass and
return your TTBPopupWindow descendant class.
- In your TTBPopupWindow descendant class, override
GetViewClass and return your TTBView descendant class.
- In your TTBView descendant class, override KeyDown to
trap unhandled keyboard events.

It isn't possible to capture mouse events at the "view" level. Individual
items have MouseDown methods that you could override, though.

--
Jordan Russell
From:Marko Binic
Subject:Re: @Jordan: Set TTBPopupWindow size
Date:Tue, 21 Dec 2004 12:01:55 +0100
> I just realized that you're talking about TTBPopupWindow, not
> TTBToolWindow...
>
> If you want to capture keyboard events at the "view" level you would have
> to:
> [...]
> It isn't possible to capture mouse events at the "view" level. Individual
> items have MouseDown methods that you could override, though.

Bummer... :( So, is there any way, any component I can derive from so I have
full control as if I derived from TCustomControl? I really need to and want
to make tool drop-down components which blend seamlessly with the
SubmenuItem as it's drop menu, how can I do this???

Cheers

Marko
From:Marko Binic
Subject:Re: @Jordan: Set TTBPopupWindow size
Date:Tue, 14 Dec 2004 13:31:09 +0100
> To set the size, override the DoArrange method and return the desired
> size.
>
> Check out the source code to TTBToolWindow (TB2ToolWindow.pas) for an
> example.

Thanks Jordan! I hope you and everyone else like my components. Now that I
know how to use some of your implementations I think they'll be even better.

Cheers

Marko
   

Copyright © 2006 knowledge-database   -   All rights reserved