Solved

Statusbar and scrollbars

Posted on 2000-02-21
16
425 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

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 Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

809 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