2. w_msg event open
string ls_data,ls_parse
integer li_loop,li_count
ls_data = message.stringparm
for li_loop = 1 to len(ls_data)
ls_parse += mid(ls_data,li_loop,1)
if right(ls_parse,1) = ',' then
ls_parse = left(ls_parse,len(ls_parse) - 1)
li_count++
choose case li_count
case 1
st_msg.text = ls_parse
case 2
cb_1.text = ls_parse
case 3
cb_2.text = ls_parse
case 4
cb_3.text = ls_parse
end choose
ls_parse = ''
end if
next
3. cb_1 event clicked
closewithreturn(parent,'1')
4. cb_2 event clicked
closewithreturn(parent,'2')
5. cb_3 event clicked
closewithreturn(parent,'3')
6. Create Global Function named f_message
global function integer f_message (string as_text, string as_option1, string as_option2, string as_option3);
string ls_return,ls_parm
ls_parm = as_text+','+as_option1+','+as_option2+','+as_option3+','
openwithparm(w_msg,ls_parm)
ls_return = message.stringparm
return integer(ls_return)
end function
7. Call Your Custom Messagebox
int li_option
li_option = f_message('Web Browser are you using','Chrome','Firefox','Internet Explorer')
choose case li_option
case 1
//Chrome
case 2
//Firefox
case 3
//Internet Explorer
end choose
8. See Them in Action
9. Cheers.. :D
Download Source Code from 4shared :
ReplyDeletehttp://www.4shared.com/zip/gaZ_QZEJ/CustomMessagebox.html?
Please checkout my Powerbuilder channel & visit my blog that you can download PowerBuilder Stuff, Ayo jangan ragu :
ReplyDeletehttps://www.youtube.com/channel/UCbn3GqvzKeneDQuy8JvoSIQ?sub_confirmation=1
https://zulmach.wordpress.com/