×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

disable resize in browse window

disable resize in browse window

disable resize in browse window

(OP)
hello,

i use the following code to control browse window.

CODE -->

BROWSE NAME obrowin NOWAIT NODELETE NOMENU NORMAL FONT 'Arial', 10 ;
       FIELDS aa :7 ,descr :50 , p_price :7 

obrowin.width = 440
obrowin.height = 400
obrowin.top = 50
obrowin.left = 50
obrowin.allowheadersizing = .f.
obrowin.allowrowsizing = .f.
obrowin.allowrowsizing = .f.
obrowin.scrollbars = 0
FOR ii=1 TO obrowin.columncount
    thewobj = 'obrowin.column'+ALLTRIM(STR(ii))+'.resizable'
    thewobj1 = 'obrowin.column'+ALLTRIM(STR(ii))+'.movable'
    &thewobj = .f.
    &thewobj1 = .f.
NEXT 

but the window can still be resized.
is there a property that can control resizing?

thank you.

RE: disable resize in browse window

The oBrowin isn't the window object, it's the grid object and it's parent property doesn't give you access to the outer border/Window/Form.
If you want to use Browse the legacy way, then first define a window and use the WINDOW clause of the BROWSE command.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: disable resize in browse window

A better option might be to create a form, add a Grid control to it, and use the grid to display your data in place of the Browse. The grid can fill the entire form, and by adjusting the form's BorderWidth property, you can make it non-resizable.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: disable resize in browse window

(OP)
thank you Olaf and Mike

RE: disable resize in browse window

Mike,

as DEFINE WINDOW allows to define a fixed form size (FROM..TO), even at a fixed position (NOFLOAT) and even with no border at all (NONE), you don't need to design a form.

But Akourou, the help topic of BROWSE explains "whose characteristics the Browse window assumes", that means the BROWSE command does create a form, a new own form. In a short experiment, the NONE-clause of DEFINE WINDOW and SHOW WINDOW does really only show a white rectangle but BROWSE still shows a form with titlebar and border. So it seems "assuming characteristics" has its limits.

On the other side, you can also create forms without titlebar and even without any border, but a form doesn't integrate into the legacy way of screens. A Grid also will mean mixing legacy and modern VFP controls, but you can position an OOP control object to a screen position translating pixels to a character position. A form also has left/top, yes, but even a borderless form will mean switching forms, that has some control tab order issues, I assume.

As I never programmed legacy screens, I only know the hearsay about using BROWSE within an application, to VFP developers it is only a developer tool for simple fast access to a DBF, not a feature of an application, as convenient as it may seem.

It makes me wonder if there is some setting, that would let BROWSE work fully compatible because it seems to have been used as the equivalent of a grid and not as the equivalence of a form in legacy VFP applications.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close