Re: EditText Bug?
- Posted by Andy Feb 11, 2009
- 1370 views
Oh I'm sorry, there was more code that I needed to post, well here is what was needed
constant File = createEx(Menu,"&File",MainWin,0,0,0,0,0,0), File_New_Project = createEx(MenuItem,"New Project",File,0,0,0,0,0,0), File_Open_Project = createEx(MenuItem,"Open Project",File,0,0,0,0,0,0), File_Close_Project = createEx(MenuItem,"Close Project",File,0,0,0,0,0,0), File_Sep = createEx(MenuItem,"-",File,0,0,0,0,0,0), File_Save_Project = createEx(MenuItem,"Save Project",File,0,0,0,0,0,0), File_SaveAs_Project = createEx(MenuItem,"Save As Project",File,0,0,0,0,0,0), File_SaveAllFiles = createEx(MenuItem,"Save All Files",File,0,0,0,0,0,0), File_Sep2 = createEx(MenuItem,"-",File,0,0,0,0,0,0), File_Frost_Option = createEx(MenuItem,"Frost Options",File,0,0,0,0,0,0), File_Sep3 = createEx(MenuItem,"-",File,0,0,0,0,0,0), File_Make_Exe = createEx(MenuItem,"Make Exe",File,0,0,0,0,0,0), File_Sep4 = createEx(MenuItem,"-",File,0,0,0,0,0,0), File_Exit = createEx(MenuItem,"Exit",File,0,0,0,0,0,0) setEnable(X_Edit,w32False) setEnable(Y_Edit,w32False) constant StatusMain = {MainStatus, 1}, StatusDate = {MainStatus, 2}, StatusTime = {MainStatus, 3}, Timer = 1 constant DAYS = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"} procedure setDateTime() sequence dt, ampm, the_date, the_time dt = getLocalTime() ampm = "AM" if dt[5] > 12 then dt[5] -= 12 ampm = "PM" elsif dt[5] = 0 then dt[5] = 12 end if the_date = sprintf("%s %02d/%02d/%04d", {DAYS[dt[3]+1], dt[2], dt[4], dt[1]}) the_time = sprintf("%02d:%02d:%02d %s", {dt[5], dt[6], dt[7], ampm}) setText(StatusDate, the_date) setText(StatusTime, the_time) end procedure procedure MainWin_onActivate(integer self, integer event, sequence parm) setDateTime() setTimer(MainWin,Timer,1000) end procedure setHandler(MainWin, w32HActivate, routine_id("MainWin_onActivate")) procedure MainWin_onResize(integer self, integer event, sequence parm) sequence rect rect = getClientRect(MainWin) setSubFields(MainStatus, {rect[3]-180, -90, -1}) end procedure setHandler(MainWin,w32HResize, routine_id("MainWin_onResize")) procedure MainWin_onTimer(integer self, integer event, sequence parm) if parm[1] = Timer then setDateTime() end if end procedure setHandler(MainWin, w32HTimer, routine_id("MainWin_onTimer")) procedure MainWin_onClose(integer self, integer event, sequence parm) killTimer(MainWin,Timer) end procedure setHandler(MainWin,w32HClose,routine_id("MainWin_onClose")) procedure Open_Frost_Options(integer self, integer event, sequence parm) openWindow(OPWin,Normal) end procedure setHandler(File_Frost_Option,w32HClick,routine_id("Open_Frost_Options"))