Page 1 of 1

Flags in Visual Designer

Posted: Wed Dec 28, 2005 3:03 am
by chen
Hi,

Im new to purebasic, one week or so, but Im in my first project.

Im using Visual Designer to sketch my GUI, but some gadgets dont have
all the flags defined in the manual and I required them.

If I add that flags manualy and I adjust the designer, and generate
again the code I lost the flags I added manually.

Could some of you help me,... how I can add that Flags to Visual Designer?


Thanks. :?

Posted: Wed Dec 28, 2005 11:39 am
by Kale
Open the '..\Purebasic\Visual Designer Constants.prefs' file in a text editor and add your own flags/constants there. :) Just remember to observe the correct syntax.

Posted: Wed Dec 28, 2005 6:40 pm
by chen
Kale wrote:Open the '..\Purebasic\Visual Designer Constants.prefs' file in a text editor and add your own flags/constants there. :) Just remember to observe the correct syntax.
I tried putting a new flag for a string Gadget.... but the flag doesnt
appear in Flags (properties window)... worse, when you close Visual
Designer and start it again the "Visual Designer Prefs" file is reseted to
a defaul values, I want to say the flag desappear.

I tried in several palces, even I created in the prefs file a new section:

[Flags]
String, 10 , MULTILINE , #ES_MULTILINE
;

but the result is the same... it doesnt work.


:cry:

OK... its working.....

What happend is I didnt have the "Visual Designer Constants" prefs file,
I got confused with "Visual Designer" Prefs file.
I added it and put the flags in it, and is working....

Need some help here:
Could you explain me the format:

Syntax:
TYPE, Constant Value , text for properties window, Text for generated source
; Note: Don't use TAB's
;
; Example:
String, 4 , Multiline , #ES_MULTILINE

what happens if I defined value=4, and I need other String Gadget with
10 lines in the same page-project?

is this only and initial value?



thanks.... :wink:

Posted: Wed Dec 28, 2005 9:26 pm
by Berikco
chen wrote:
Syntax:
TYPE, Constant Value , text for properties window, Text for generated source
; Note: Don't use TAB's
;
; Example:
String, 4 , Multiline , #ES_MULTILINE

what happens if I defined value=4, and I need other String Gadget with
10 lines in the same page-project?

is this only and initial value?



thanks.... :wink:
It would not be a CONSTANT if you change the value
#ES_MULTILINE = 4
You must use this value or it wil not work.
#ES_MULTILINE = 4 does not mean 4 lines, this depents on the height and fontsize you give the gadget.