Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ammar Hadi
  Where is Ammar Hadi?
 Al-Samawah
 Iraq
 Ammar Hadi
 To: sanjay karia
  Where is sanjay karia?
 mumbai
 India
 sanjay karia
 Tags
Subject: RE: freeze object in scrollable form
Thread ID: 228449 Message ID: 228457 # Views: 2 # Ratings: 3
Version: Visual FoxPro 9 Category: Forms
Date: Tuesday, May 19, 2009 7:07:16 AM         
   


> Hello Friends,
>
> In a scrollable form when I am scrolling horizontally i.e. left to right or right to left.. then all the objects on the form also scrolls,
> How can I fix a particular object say, commandbox1, something like freeze/lock column in grid. I want commandbox remain where it was, even if I scroll the form.
>
> Please note, I can not use Pageframes here.
>
> Any Ideas?
>
> Thanks in advance.

Hi,
this is a form with fixed command button and a floating textbox.
depend on the event SCROLLED and the property VIEWPORTLEFT

PUBLIC frmTest

frmTest = CREATEOBJECT('Form1')

frmTest.SHOW(1)

DEFINE CLASS form1 AS FORM

  WIDTH=400
  HEIGHT=200
  SCROLLBARS=1

  ADD OBJECT cmdFixed AS COMMANDBUTTON WITH;
    WIDTH=100,;
    HEIGHT=40,;
    LEFT=30,;
    VISIBLE=.T.,;
    CAPTION="fixed"

  ADD OBJECT textbox1 AS TEXTBOX WITH;
    WIDTH=100,;
    HEIGHT=40,;
    LEFT=600,;
    VISIBLE=.T.,;
    VALUE="floating"

  PROCEDURE SCROLLED
    LPARAMETERS nDirection
    THIS.cmdFixed.LEFT=THIS.VIEWPORTLEFT+30
  ENDPROC

ENDDEFINE


Hope this helps


Ammar Hadi ................IRAQ

My Foxite Weblog

---------------
I I I really love foxite
___________________________

ENTIRE THREAD

freeze object in scrollable form Posted by sanjay karia @ 5/19/2009 6:12:45 AM
RE: freeze object in scrollable form Posted by Ammar Hadi @ 5/19/2009 7:07:16 AM
RE: freeze object in scrollable form Posted by sanjay karia @ 5/19/2009 9:15:58 PM