Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Statusbar and scrollbars

Posted on 2000-02-21
16
Medium Priority
?
441 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 150 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

916 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