this i probably the most useless snippet you will find. but here you go :)
dialog NP {
title "Note Pad"
size -1 -1 232 206
option dbu
edit "", 1, 2 12 228 183, multi return autohs autovs hsbar vsbar
button "Close", 2, 3 1 226 10, flat
button "Clear", 3, 2 195 227 10, flat
}
on *:dialog:np:sclick:3:{
did -r np 1
}
on *:DIALOG:NP:sclick:2:{
dialog -x NP NP
}
menu * {
.Note Pad: dialog -m np np
}
heres one i was working on, didnt finish it tho
menu * {
Notepad:dialog -dm notepad notepad
}
dialog notepad {
title "Untitled"
size -1 -1 275 350
option dbu
box "", 1, 2 2 271 346
edit "", 2, 4 7 267 339, multi, vsbar, autovs
edit "", 3, 4 7 267 339, multi, center, vsbar, autovs
edit "", 4, 4 7 267 339, multi, right, vsbar, autovs
menu "File" 100
item "New" 101, 100
item "Save" 102, 100
item "Load" 103, 100
item break, 104, 100
item "Close And Save" 105, 100
item "Close" 106, 100, cancel
menu "Text Settings" 200
menu "Align" 201, 200
item "left" 202, 201
item "Center" 203, 201
item "Right" 204, 201
}
on *:dialog:notepad:menu:*:{
if $did = 101 {
did -r notepad 2,3,4
}
if $did = 102 { saving.notepad.file }
if $did = 103 { loading.notepad.file }
if $did = 105 { saving.notepad.file | dialog -x notepad }
if $did = 202 { did -h notepad 3,4 | did -v notepad 2 | did -r notepad 2 | did -a notepad 2 $did(notepad,%notepad.active.align) | set %notepad.active.align 2 }
if $did = 203 { did -h notepad 2,4 | did -v notepad 3 | did -r notepad 3 | did -a notepad 3 $did(notepad,%notepad.active.align) | set %notepad.active.align 3 }
if $did = 204 { did -h notepad 2,3 | did -v notepad 4 | did -r notepad 4 | did -a notepad 4 $did(notepad,%notepad.active.align) | set %notepad.active.align 4 }
}
alias saving.notepad.file {
set -u5 %temp.notepad.save.file $$?"Name File-Including File Type"
dialog -t notepad %temp.notepad.save.file
write %temp.notepad.save.file $did(notepad,2)
}
alias loading.notepad.file {
did -r notepad 2
set -u5 %temp.notepad.load.file $sfile($mircdir)
dialog -t notepad $nopath(%temp.notepad.load.file)
%a = 1
%b = $lines(%temp.notepad.load.file)
while %a <= %b {
did -a notepad 2 $($read( $+ %temp.notepad.load.file $+ , %a) $+ $chr(32))
inc %a
}
}