I am interested in opening a form in design mode and changing the property of a form object and saving the change so it is permanent. Is this possible? I've been looking but can't find out how to do this, or if even possible. There was a recent thread about a this for a browse, I believe but I don't think it was ever identified that you can't do this, completely. Thanks.
Announcement
Collapse
The Alpha Software Forum Participation Guidelines
The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
Moderators may also rename posts and threads if they are too generic or do not property reflect the content.
Moderators may move threads if they have been posted in the incorrect forum.
Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.
The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.
Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.
Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.
Bonus TIPS for Successful Posting
Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.
When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.
The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.
When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.
A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.
If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.
When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.
Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
- Be professional in your conduct
- Be kind to others
- Be constructive when giving feedback
- Be open to new ideas and suggestions
- Stay on topic
Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
- Spam.
- Vulgar language.
- Quotes from private conversations without permission, including pricing and other sales related discussions.
- Personal attacks, insults, or subtle put-downs.
- Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
- Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
- Sexually explicit or violent material, links, or language.
- Pirated, hacked, or copyright-infringing material.
- Encouraging of others to engage in the above behaviors.
If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
- Remove the Post or Thread - the content is removed from the forum.
- Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
- Temporarily Ban the User - user is banned from forum for a period of time.
- Permanently Ban the User - user is permanently banned from the forum.
Moderators may also rename posts and threads if they are too generic or do not property reflect the content.
Moderators may move threads if they have been posted in the incorrect forum.
Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.
The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.
Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.
Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.
Bonus TIPS for Successful Posting
Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.
When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.
The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.
When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.
A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.
If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.
When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.
Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less
Open form in design mode, change 1 object property, save form, close form with xbasic
Collapse
X
-
Re: Open form in design mode, change 1 object property, save form, close form with xb
I don't think you can open to design mode with xbasic but you can switch to design mode after you open it.
:Form.view(layout_name)
a5_sec_topparent_command("SYSTEM_DESIGN", "design")
If you use ptr = :Form.view(layout_name)
you should be able to reference the form objects via the pointer.There can be only one.
-
Re: Open form in design mode, change 1 object property, save form, close form with xb
Stan,
You're a giant! I went through every A5. function. Seem to have misplaced the A5_ functions in my mind. I think I'll try form.load() and see how that works. Thank you very much.Mike W
__________________________
"I rebel in at least small things to express to the world that I have not completely surrendered"
Comment
-
Re: Open form in design mode, change 1 object property, save form, close form with xb
So where did my post
a5_sec_topparent_command("SYSTEM_DESIGN", "design")
"Where is this documented Stan?" go to?
Someone take it out?
Ah forget it. The answer is above doh!See our Hybrid Option here;
https://hybridapps.example-software.com/
Apologies to anyone I haven't managed to upset yet.
You are held in a queue and I will get to you soon.
Comment
-
Re: Open form in design mode, change 1 object property, save form, close form with xb
Originally posted by Stan Mathews View PostDon't neglect the Action Scripting, Menu Commands category as a learning and discovery tool.Mike W
__________________________
"I rebel in at least small things to express to the world that I have not completely surrendered"
Comment
-
Re: Open form in design mode, change 1 object property, save form, close form with xb
Originally posted by Mike Wilson View PostI went through every A5. function. Seem to have misplaced the A5_ functions in my mind.
However, the method shown is a somewhat long, indirect way to open a layout in design mode.
Perhaps you should look at A5_Layout_Design()?Regards,
Ira J. Perlow
Computer Systems Design
CSDA A5 Products
New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
CSDA Barcode Functions
CSDA Code Utility
CSDA Screen Capture
Comment
-
Re: Open form in design mode, change 1 object property, save form, close form with xb
here is some code I have been using for several years, originally developed by Jim Chapman
it initially gets some properties of the form, and then saves them back before saving and closing the form - which was necessary at the time this was originally developed, as otherwise some of those properties would be lost. I don't know if it is still necessary, but it works in 10.5.
Code:'Date Created: 27-May-2005 01:55:34 PM 'Last Updated: 31-Aug-2011 03:19:22 PM 'Created By : martin cole 'Updated By : martin cole on error goto errors onkeylastuse=<<%code% lastuse=toseconds(time()) %code% printscreen=<<%code% if a_user.key.value="{PRNT SCRN}" 'see code archive for sample adb using this temp1=this.Name() temp=sys_id_size_get(temp1) f_width=val(word(temp,1,"x")) a_user.key.handled=.t. prtscr(f_width) end end if %code% buttononpush=<<%code% lastuse=toseconds(time()) %code% buttonevents=<<%code% onpush %code% vForms = a5.Form_Enum(2) vNumber = line_count(vForms) '******************************************** '******************************************** '** Writing to form event 'blows away' other '** form properties. So initialize variables '** with the properties before writing to the '** event and then restore the properties '** before saving the form. '******************************************** '******************************************** dim vForm_Height as n = 2 dim vForm_Width as n = 2 dim vWindow_Height_mode as c = "" dim vWindow_Width_mode as c = "" dim vWindow_allow_maximize as l = .t. dim vWindow_allow_minimize as l = .t. dim vWindow_allow_resize as l = .t. dim vWindow_has_caption as l = .t. dim vWindow_has_system_menu as l = .t. true1=.f. zz=0 for zz = 1 to vNumber true1=.f. vFrm = word(vForms,zz,crlf()) f=form.load(vFrm, "SCRIPT_DISABLE_EXEC") buttons=f.child_enum("f=button") f.Command("system_design") vForm_Width = f.form_width vForm_Height = f.form_height vWindow_Height_mode = f.window.height_mode vWindow_Width_mode = f.window.width_mode vWindow_allow_maximize = f.window.allow_maximize vWindow_allow_minimize = f.window.allow_minimize vWindow_allow_resize = f.window.allow_resize vWindow_has_caption = f.window.has_caption vWindow_has_system_menu = f.window.has_system_menu changed=.f. if *any(f.code.onkey, onkeylastuse) else f.code.onkey=onkeylastuse + crlf() + f.code.onkey true1=.t. end if if *any(f.code.onfetch, onkeylastuse) else f.code.onfetch=onkeylastuse + crlf() + f.code.onfetch true1=.t. end if if *any(f.code.onkey, printscreen) else f.code.onkey=printscreen + crlf() + f.code.onkey true1=.t. end if '*********************************** for i=1 to w_count(buttons,crlf()) for j=1 to w_count(buttonevents,crlf()) temp=eval("f:" + alltrim(word(buttons,i,crlf())) + ".code." + word(buttonevents,j,crlf())) temp2=temp if *any(temp, buttononpush) else temp2=buttononpush + crlf() + temp true1=.t. eval("f:" + alltrim(word(buttons,i,crlf())) + ".code." + word(buttonevents,j,crlf()))=temp2 end if next j next2: next i '*********************************** if true1=.t. f.form_height = vForm_Height f.form_width = vForm_Width f.window.height_mode = vWindow_Height_mode f.window.width_mode = vWindow_Width_mode f.window.allow_maximize = vWindow_allow_maximize f.window.allow_minimize = vWindow_allow_minimize f.window.allow_resize = vWindow_allow_resize f.window.has_caption = vWindow_has_caption f.window.has_system_menu = vWindow_has_system_menu f.Command("file_save") '??may save time not saving in unnecessary?? end if f.close() next zz end errors: err_msg = error_text_get(error_code_get()) line = error_line_number_get() script = error_script_get() ui_msg_box("Error", err_msg+" Error occurred at line "+alltrim(str(line,4,0))+ " in script: "+script) resume next end
Cole Custom Programming - Terrell, Texas
972 524 8714
[email protected]
____________________
"A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw
Comment
-
Re: Open form in design mode, change 1 object property, save form, close form with xb
Originally posted by csda1 View PostYou must go through all functions, since Alpha doesn't have a standard nomenclature and the wiki makes it a bit hard to find some stuff.
However, the method shown is a somewhat long, indirect way to open a layout in design mode.
Perhaps you should look at A5_Layout_Design()?
fp = a5_layout_design(...)
<do whatever>
fp.command( "file_save" )
Comment
Comment