Skip to content

save to sfx

Forums Forums SIMPOL Programming save to sfx

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3464
    JD Kromkowski
    Participant

    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.

    #3466
    Michael
    Keymaster

    Hi 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, 3 months ago by Michael.
    #3469
    JD Kromkowski
    Participant

    Thanks. 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), selection

    NOT Hours, uparrowhours, downarrowhours, Minutes, minarrowup, minarrowup , am/pm, selection

    #3471
    Michael
    Keymaster

    We 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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.