Yes C.D. there is. Browse's when clause.
browse .... name "myBrowse" when SetMyBrowse()
function SetMyBrowse
with myBrowse
endwith
When would fire each time you move record pointer so if it's a problem you could initialize a variable to fire property settings once :
lPropsSet = .f.
browse .... name "myBrowse" when !lPropsSet and SetMyBrowse()
function SetMyBrowse
with myBrowse
endwith
lPropsSet = .t.
Cetin
>Cetin,
>
>I've tried the code as following:-
>
>BROWSE NAME "mybrowse" NOMODI NOAPPEND NODELETE NOWAIT
>WITH mybrowse
> .width=25
> .height=150
> .left=56
> .top=82
> .allowrowsizing=.F.
> .allowheadersizing=.F.
> .deletemark=.F.
> .scrollbars=2
>ENDWITH
>
>The setttings only works if the NOWAIT is included. However, I need the BROWSE to be close b4 continue the program execution (exclude NOWAIT). Any solution to this?
>
>Gan
>
>>>All,
>>>
>>>I have a DEFINE WINDOW command line where I want to control the properties of it. Example , I want only vertical scrollbar when I issue a BROWSE ....WINDOW using the window. Or, Allow Row Sizing =.F. when doing the job.
>>>
>>>How can I do that? NAME objectname in the DEFINE WINDOW syntax?
>>>
>>>
>>>Thanks,
>>>Gan
>>C.D.
>>Mixing browse object and define window. They're separate and as Ed said you could use a form instead of window.
>>To be able to manage a browse like a grid use "NAME" clause as you guessed :
>>
use home()+"samples\data\employee"
>>browse name "myBrowse" nowait
>>with myBrowse
>> .scrollbars = 2
>> .AllowRowSizing = .f.
>> .Setall("DynamicBackColor","iif(recno()%2=0,255^3,255^2)","column")
>>*...
>>endwith
Browse is one of the most powerfull commands of FP but yet try to shift towards using grid. In some aspects it's more powerfull (and lacking compared to browse in a minor set - like when, valid events behaviour).
>>Cetin