Now, for another beer...
Doug
<snip>
Yup, that's a big help Razzak, thank you.
To clear up any ambiguity, "you _must_ convert those values accordingly", so that Charlie's example from below would be:
SET VAR vSize TEXT = NULL
GETPROPERTY RBASE_FORM HEIGHT vSize
PROPERTY RBASE_FORM HEIGHT (int(.vSize ))
GETPROPERTY RBASE_FORM HEIGHT vSize
PROPERTY RBASE_FORM WIDTH (int(.vSize )) --Is this to create a square window? width = height?
Sorry to be a stickler, just want to make sure I understand it correctly.
Thanks for your patience (no pun intended, Dr. R: :),
Doug
A. Razzak Memon wrote:
Doug,
Actually, all values are returned as TEXT when using the GETPROPERTY
command.
Once you have the value, depending on your application, etc., you can
convert those values accordingly.
Here's an example of such scenario:
GETPROPERTY RBASE_FORM LEFT 'vLeft'
GETPROPERTY RBASE_FORM TOP 'vTop'
SET VAR vLeftPixel INTEGER = ((INT(.vLeft)) + 244)
SET VAR vTopPixel INTEGER = ((INT(.vTop)) + 60)
PROPERTY RBASE_FORM LEFT .vLeftPixel
PROPERTY RBASE_FORM TOP .vTopPixel
RETURN
Hope that explains.
Very Best R:egards,
Razzak.
At 04:57 PM 6/11/2004 -0500, Doug Hamilton wrote:
So Height and Width properties both use text arguments, even
though one would think integer would be the logical data type?
Is it true then that all Property and Getproperty use text
arguments? Could that be clarified in future documentation?
"Specifies the vertical size of the control in pixels, where
nnn is a text value." Heck, I still get tripped up sometimes
by CHOOSE returning text values for integer columns.
A. Razzak Memon wrote:
At 03:01 PM 6/11/2004 -0500, Charlie Parks wrote:
What is the correct syntax to set Height and Width dynamically?
I tried this
SET VAR vSize TEXT = NULL
GETPROPERTY RBASE_FORM HEIGHT .vSize
PROPERTY RBASE_FORM HEIGHT .vSize
GETPROPERTY RBASE_FORM HEIGHT .vSize
PROPERTY RBASE_FORM WIDTH .vSize
and the form seems get to huge instead of staying the same size.
I am using
Front End Build: 7.1.74.30611
R:BASE v7.1 Windows (32-bit), U.S. Version, Build: 7.003xRT04
Charlie,
Take out the dot (.) when receiving value into the variable using
the GETPROPERTY command.
Try the following:
SET VAR vSize TEXT = NULL
GETPROPERTY RBASE_FORM HEIGHT vSize
PROPERTY RBASE_FORM HEIGHT .vSize
GETPROPERTY RBASE_FORM HEIGHT vSize
PROPERTY RBASE_FORM WIDTH .vSize
Have fun!
Very Best R:egards,
Razzak.
[EMAIL PROTECTED] wrote:
You made me go look at RRBMY8. I'm Confused, can someone smart tell me when do you use quotes and when do you not (or do they both work)?Here is code form the EEP in Sales Transactions formSWITCH (.vMode)
CASE 'ENTER'
PROPERTY EGB_First ENABLED FALSE
PROPERTY EGB_Prev ENABLED FALSE
PROPERTY EGB_Next ENABLED FALSE
PROPERTY EGB_Last ENABLED FALSE
PROPERTY EGB_Add ENABLED FALSE
PROPERTY EGB_Del ENABLED FALSE
PROPERTY EGB_Refresh ENABLED FALSE
PROPERTY DBEdit_Company SET_FOCUS 'TRUE'
BREAK CASE 'VIEWALL'[EMAIL PROTECTED] wrote: -----
PROPERTY DBComboBox_PaymentTerms ENABLED 'FALSE'
PROPERTY EGB_Add ENABLED FALSE
PROPERTY EGB_Del ENABLED FALSE
PROPERTY EGB_Save ENABLED FALSE
PROPERTY EGB_Cancel CAPTION 'Close'
PROPERTY EGB_Cancel FONT_COLOR 'RED'
PROPERTY EGB_Refresh ENABLED FALSE
PROPERTY EGB_Next SET_FOCUS 'TRUE'
BREAK
DEFAULT
BREAK
ENDSW
RETURN
To: [email protected] (RBG7-L Mailing List)
From: Doug Hamilton <[EMAIL PROTECTED]>
Sent by: [email protected]
Date: 03/28/2005 11:22PM
Subject: [RBG7-L] - RE: GetProperty TEXTVALUE problem
I did try without the quotes - no luck.
I'm not using any variables on the form - dbedits only; no recalcs.
Thanks for the suggestions.
If the quotes aren't s'posed to be there, why does R:Docs show 'em?
I'm gonna have a beer.
Doug
[EMAIL PROTECTED] wrote:
I believe that John Engwer is correct. Removethe quotes. I have also had it drive me to drink when using the 'GetpropertyTextvalue' command on a variable checkbox. Be careful if you define the variablein variables section of the form, as any time you perform a recalc or update/saverowit will recalculate the variable and change it back to the default. I havelearned to define the variables in the 'On after start EEP' of the form.Another one that got me was using the Getproperty to get the new valueof a DBchebox when changed by a user. I used it to validate if a user isalowed to change the value by comparing to another variable. If the userwas not allowed to do this I user the Property to change it back. The problemis that it will re-loop through your EEP when you user the property command.I ended up using nested 'If...Then...staments to stop this. Probably worthlessinformation to most people, but if it can save one programer from frustration...then it was worth writing about.Here is code from a working form: (I always call my Component ID (Fieldname_CID) and the variables (vFieldname) so I can remember the name.Getproperty Serv_BTN_CID Textvalue vServ_BTNProperty Serv_BTN_CID Textvalue programmer.vServe_BTNIf you use 'True' or 'False' in the command do not enclose it in quotes.Property Serv_BTN_CID ENABLED TRUE
