Solved

Statusbar and scrollbars

Posted on 2000-02-21
16
427 Views
Last Modified: 2012-05-04
I am having trouble with the status bar.

When I load something into my form that brings about the scrollbars, the status bar is moved to the bottom of the scroll.  I want to have the status bar always on top with the scrollbars still enabled.

0
Comment
Question by:fibdev
  • 6
  • 5
  • 4
  • +1
16 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 50 total points
ID: 2544206
Set Align property to alTop.

If this still doesn't help you... then drop a panel, set it's align property to alTop and drop the statusbar on the panel.

Zif.
0
 
LVL 17

Expert Comment

by:inthe
ID: 2544247
agree ..(the panel trick will do it for sure).
0
 
LVL 17

Expert Comment

by:inthe
ID: 2544251
but wont the panel be alBottom?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:fibdev
ID: 2544276
I tryed the panel idea and it still isn't working.  As soon as the scrollbar appears, the panel and statusbar are gone (till I scroll down of course).
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 2544281
mmm, can you show us how your form looks like?
0
 
LVL 3

Author Comment

by:fibdev
ID: 2544358
This form gives you the idea of what happens when I load an image into the image box at run time.

http://fibdev.com/bin/mydelphi.zip
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 2545568
mmm, I get a streaming error when loading your form.
0
 
LVL 3

Author Comment

by:fibdev
ID: 2545752
It's a delphi 5 project.  Don't know if that's why, but it loads fine here.
0
 
LVL 17

Expert Comment

by:inthe
ID: 2547582
i also use d4 ( yes this is stream error reason :-(


0
 
LVL 17

Expert Comment

by:inthe
ID: 2547603
you could post the code of your unit here and right click on your form and choose "view as text" and also paste that here ,then us underpriviledged ;-) d4 users can build you project to test

0
 
LVL 8

Expert Comment

by:ZifNab
ID: 2547688
fibdev,

here is what you can do :

1.

* Set Image.Align property to alClient

But then you loose the scrollbars arond the image when the form gets smaller.

This is a better way :

2.

* Put a TScrollBox on the form and set its align property to alClient.
* Drop the TImage inside the TScrollBox

Thus your form should look like :

a TStatusBar at bottom (no panel)
a TScrollBox as alClient (thus filling rest of form)
a TImage inside the TScrollBox

And then you get the behavior you want.

Regards, Zif.
0
 

Expert Comment

by:mountykit
ID: 2550770
listening
0
 
LVL 3

Author Comment

by:fibdev
ID: 2552563
Hey Zif,

I tryed it, still having the problem :\
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 2553746
????

Please send me your e-mail-address and I'll send you the code.

Zif.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 2555249
object Form1: TForm1
  Left = 192
  Top = 107
  Width = 696
  Height = 480
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object StatusBar1: TStatusBar
    Left = 0
    Top = 434
    Width = 688
    Height = 19
    Panels = <>
    SimplePanel = False
  end
  object ScrollBox1: TScrollBox
    Left = 0
    Top = 0
    Width = 688
    Height = 434
    Align = alClient
    TabOrder = 1
    object Image1: TImage
      Left = 0
      Top = 0
      Width = 105
      Height = 105
    end
  end
end
0
 
LVL 3

Author Comment

by:fibdev
ID: 2555895
zif,

expert@fibdev.com

Let me post some VB code to demonstrate the way I think this should work.  If someone can get the idea from the code (even if they don't know vb) then maybe they can tell me how it should look in delphi.

vb code sample for resizing the scrolbars to fit.
This is assuming the status bar is 15 pixels tall.
======================================

Sub Form1_Resize()

  ' Resize the vertical scrollbar
  With vScrollbar
    .top = 0
    .height = Form1.height - 30
  End With

  ' Now the horizontal scrollbar
  Dim BottomValue as Integer
 
  BottomValue = Form1.Height - 30 ' 15 for the scrollbar, 15 for the status bar
  With hScrollbar
    .Top = BottomValue
    .Width = Form1.Width - 15
  End With

End Sub

There may be an error or two in this code.  I just wrote it here and haven't really checked it.  So, VB ppl, please excuse me :)  This should give someone the idea of how I think this should work.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question