Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Auto Resize a Toolbar with web browser?
#1
Hi Gintaras,

I need to bother you again Smile

My Problem:
I made myself a Toolbar with web browser with the function ToolbarExProc_TWWB and
made it autoshrink.
Because not every page has the same size I want it to auto resize. I found __tb_auto_size
but it seems that it only ajust depending on the buttons in the tb.
How can I do it to auto size like in the screens?

Edit:
oh and how do I align the close button to the right side?

Regards
Staati


Attached Files Image(s)
       
#2
How will you know page width and height? Do you know it for every page that you'll use, or need to automatically calculate? For example, smallest width without horizontal scrollbar.
#3
auto calculate but not bigger than say 600 would be good, with fixed width it would need tweeking when someone changes the site
#4
I'm trying to calculate width, but still unsuccessfully. MSHTML.IHTMLElement2.scrollWidth can be used for some pages, but incorrect with other pages.
#5
can I search for the scrollbar? I can't find it with accessible objects...
Can I check if the scrollbar is shown or not?

dirtiest possibility would be to scan for the left scroll bar button...an resize the window in steps
till its gone, and that would also look stupid Smile
#6
I also cannot find scrollbars as accessible objects. Also cannot find a function that tells whether scrollbar is present. Now testing another dirty way...
#7
what about this?
MSDN
Can it be used in qm?
#8
it can be used only in .NET code.
#9
Also tried to get HTML element height (Htm.Location), and compare with control height, but it works not with all pages. Don't have more ideas.
#10
ok then i'll try it with scan Sad
But still wondering...how does the window know when to use a scrollbar?

well anyway thanks for the efford!

Regards
Staati


Forum Jump:


Users browsing this thread: 1 Guest(s)