Forums › Forums › SIMPOL Programming › save to sfx
Tagged: SFX SXF
- This topic has 3 replies, 2 voices, and was last updated 7 years, 7 months ago by Michael.
- AuthorPosts
- January 20, 2017 at 2:03 pm #3464JD KromkowskiParticipant
Is there a function somewhere to save a wxform as an .sfx. I cannot seem to find it.
A form is programmatically created. Stuff happens which changes form. I want to then save it as a .sfx, so that I can fine tune it in form designer at a later date.
Something like: save2sfx(f, filename)
In the first instance, I really hate (don’t take it personally) the date and time interfaces in uisyshelp.smp. I want to redo them but I don’t want to start from scratch. I can see the calendarform.sma, for example. I’d like to run that, save the form as .sfx and then “fix” it in Form Designer.
A lot has happened in 10+ years. Things look different and my eyesight is worse (so I need something a tad bigger and visually easier) and it really sucks in January 2017 to have to pick a date in December 2016 where I have to change both year and month. There is so much free code out there for more elegant gui date and time interfaces that I’d like to take a stab at it.
January 20, 2017 at 2:22 pm #3466MichaelKeymasterHi John,
You can’t save a wxform to a *.sxf directly, since it isn’t a dataform1 (which is what we store in *.sxf files). However, I had the same problem and came up with the following solution, assuming your form variable is f:
dataform1 df integer e e = 0 df =@ convertwxformtodataform1(f) savedataform1(df, "myform.sxf", error=e)
As for the date and time interfaces, or the calendar control, you are welcome to give it a go. The calendar control was contributed by a customer in Europe and I only made a few recent changes to it to allow for North American calendar format (week starts on Monday instead of Sunday like in Europe).
The big problem that I find with any of these, is that I would normally want to get a bunch of information from the user, not just a single date or time, so I end up creating a custom dialog for everything anyways.
Ciao, Neil
- This reply was modified 7 years, 7 months ago by Michael.
January 20, 2017 at 2:53 pm #3469JD KromkowskiParticipantThanks. It seems like wxwidgets already has a better calendar. wxMSW Appearance http://docs.wxwidgets.org/3.1/classwx_calendar_ctrl.html
but maybe you’re not using 3.1
There are simple things like the time picker tab sequence.
Hours, Minutes, AM/PM (which should be spinner too), selectionNOT Hours, uparrowhours, downarrowhours, Minutes, minarrowup, minarrowup , am/pm, selection
January 20, 2017 at 5:42 pm #3471MichaelKeymasterWe are currently testing wxWidgets 3.0 on Linux. Once we are satisfied it is working correctly, we will try and get it into our Windows release. At that point we can take a look at the wxCalendarCtrl.
- AuthorPosts
- You must be logged in to reply to this topic.