Picture View In PowerBuilder
Code Example
uo_picture_view from datawindow
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
forward global type uo_picture_view from datawindow end type end forward global type uo_picture_view from datawindow integer width = 2514 integer height = 1412 boolean titlebar = true string title = "Picture View" string dataobject = "d_picture_view" boolean controlmenu = true boolean minbox = true boolean maxbox = true boolean resizable = true boolean livescroll = true event ue_leftbuttondown pbm_lbuttondown event ue_mousemoving pbm_mousemove event ue_leftbuttonup pbm_lbuttonup end type global uo_picture_view uo_picture_view type variables Private: String is_picture_FileName String is_curs_moving,is_curs_moved,is_curs_zoomin,is_curs_zoomout Boolean ib_photo_moving,ib_zoomin,ib_zoomout,ib_DoNothing = False Integer ii_lbuttondown_posx,ii_lbuttondown_posy,ii_pic_width,ii_pic_height Dec{2} id_scale_step = 0.25 ,id_cur_scale = 1.00 end variables forward prototypes public subroutine uf_settitle (string as_title) public function boolean uf_setfilename (string as_filename) public subroutine uf_setzoomscalestep (decimal ai_newscale) public subroutine uf_setpicsize (integer ai_pic_width, integer ai_pic_height) public subroutine uf_setzoomscale (decimal ai_newscale) public subroutine uf_setbackcolor (long al_back_color) end prototypes event ue_leftbuttondown;If xpos > 1200 And xpos < 1800 And ypos >= 20 And ypos <= 84 Then ib_DoNothing = True Return End If If ib_DoNothing Then Return If Not ib_zoomin And Not ib_zoomout Then ib_photo_moving = True ii_lbuttondown_posx = xpos ii_lbuttondown_posy = ypos This.Object.datawindow.Pointer = is_curs_moving This.Object.p_photo_view.Pointer = is_curs_moving Else ib_photo_moving = False // this.object.datawindow.pointer = is_curs_moved // this.object.p_photo_view.pointer = is_curs_moved End If end event event ue_mousemoving;This.Object.t_posx.Text = String(xpos) This.Object.t_posy.Text = String(ypos) If ib_DoNothing Then Return If Not ib_photo_moving Then Return Integer li_picx,li_picy Integer li_movex,li_movey li_picx = Integer(This.Object.p_photo_view.X) li_picy = Integer(This.Object.p_photo_view.Y) li_movex = xpos - ii_lbuttondown_posx li_movey = ypos - ii_lbuttondown_posy This.SetRedraw(False) This.Object.p_photo_view.X = li_picx + li_movex This.Object.p_photo_view.Y = li_picy + li_movey This.SetRedraw(True) ii_lbuttondown_posx = xpos ii_lbuttondown_posy = ypos end event event ue_leftbuttonup;If xpos > 1200 And xpos < 1800 And ypos >= 20 And ypos <= 84 Then Return If ib_DoNothing Then Return If Not ib_zoomin And Not ib_zoomout Then ib_photo_moving = False This.Object.p_photo_view.Pointer = is_curs_moved This.Object.datawindow.Pointer = is_curs_moved Return End If If ii_pic_width <= 0 Then Return If ib_zoomin Then id_cur_scale = id_cur_scale + id_scale_step End If If ib_zoomout Then id_cur_scale = id_cur_scale * (1 - id_scale_step) End If If id_cur_scale >= 8.0 Or id_cur_scale <= 0.05 Then Return Long li_new_x,li_new_y,li_new_width,li_new_height Long li_x0,li_y0,li_old_width,li_old_height,li_addx,li_addy //Double lf_tgn,ld_addx,ld_addy,ld_sin,ld_cos,ld_len This.SetRedraw(False) li_x0 = Long(This.Object.p_photo_view.X) li_y0 = Long(This.Object.p_photo_view.Y) li_old_width = Long(This.Object.p_photo_view.Width) li_old_height = Long(This.Object.p_photo_view.Height) li_new_width = ii_pic_width * id_cur_scale li_new_height = ii_pic_height * id_cur_scale /* ld_len = sqrt((xpos - li_x0)*(xpos - li_x0) + (ypos - li_y0) * (ypos - li_y0)) ld_sin = ( ypos - li_y0)/ld_len ld_cos = ( xpos - li_x0)/ld_len debugbreak() */ li_addx = (xpos - li_x0) * (id_cur_scale -1) li_addy = (ypos - li_y0) * (id_cur_scale -1) li_new_x = li_x0 - li_addx li_new_y = li_y0 - li_addy This.Object.t_scale.Text = String(id_cur_scale,'##0%') //this.object.p_photo_view.x = li_new_x //this.object.p_photo_view.y = li_new_y This.Object.p_photo_view.Width = li_new_width This.Object.p_photo_view.Height = li_new_height This.SetRedraw(True) end event public subroutine uf_settitle (string as_title);this.object.st_title.text = as_Title end subroutine public function boolean uf_setfilename (string as_filename);if FileExists(as_filename) then this.object.p_photo_view.visible = 0 this.object.p_photo_view.Filename = as_fileName this.object.p_photo_view.visible = 1 return True else this.object.p_photo_view.FileName = 'LiuFang' return True end if end function public subroutine uf_setzoomscalestep (decimal ai_newscale);id_scale_step = ai_newscale end subroutine public subroutine uf_setpicsize (integer ai_pic_width, integer ai_pic_height);this.setredraw(false) this.object.p_photo_view.width = ai_pic_width this.object.p_photo_view.height = ai_pic_height ii_pic_width = ai_pic_width ii_pic_height = ai_pic_height this.object.t_scale.text = '100%' this.setredraw(true) end subroutine public subroutine uf_setzoomscale (decimal ai_newscale);id_cur_scale = ai_newScale if id_cur_scale >= 8.0 or id_cur_scale <= 0.05 then return Long li_new_x,li_new_y,li_new_width,li_new_height Long li_x0,li_y0,li_old_width,li_old_height,li_addx,li_addy //Double lf_tgn,ld_addx,ld_addy,ld_sin,ld_cos,ld_len this.setredraw(false) li_x0 = Long(this.object.p_photo_view.x) li_y0 = Long(this.object.p_photo_view.y) li_old_width = Long(this.object.p_photo_view.width) li_old_height= Long(this.object.p_photo_view.height) li_new_width = ii_pic_width * id_cur_scale li_new_height = ii_pic_height * id_cur_scale //li_addx = (xpos - li_x0) * (id_cur_scale -1) //li_addy = (ypos - li_y0) * (id_cur_scale -1) li_new_x = li_x0 //- li_addx li_new_y = li_y0 //- li_addy this.object.t_scale.text = string(id_cur_scale,'##0%') //this.object.p_photo_view.x = li_new_x //this.object.p_photo_view.y = li_new_y this.object.p_photo_view.width = li_new_width this.object.p_photo_view.height = li_new_height this.setredraw(true) end subroutine public subroutine uf_setbackcolor (long al_back_color);this.modify('datawindow.header.color='+string(al_back_color)) end subroutine on uo_picture_view.create end on on uo_picture_view.destroy end on event constructor;is_curs_moved = "hand.cur" is_curs_moving = "hand2.cur" is_curs_zoomin = 'zoomin.cur' is_curs_zoomout = 'zoomout.cur' end event event clicked;//==================================================================== // Event: uo_picture_view.clicked() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // value integer xpos // value integer ypos // value long row // value dwobject dwo //-------------------------------------------------------------------- // Returns: long //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2022/02/20 //-------------------------------------------------------------------- // Usage: uo_picture_view.clicked for uo_picture_view //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== //if NOT( xpos > 1200 and xpos < 1800 and ypos >= 20 and ypos <= 84 ) then return ib_DoNothing = True String ls_button_name,ls_modify ls_button_name = dwo.Name If ls_button_name = 'b_all' Then This.SetRedraw(False) This.Object.p_photo_view.X = 41 This.Object.p_photo_view.Y = 104 This.Object.p_photo_view.Width = ii_pic_width This.Object.p_photo_view.Height = ii_pic_height This.Object.t_scale.Text = '100%' id_cur_scale = 1.00 This.SetRedraw(True) ib_DoNothing = False Return End If If ls_button_name = 'b_left' Then This.SetRedraw(False) Long ll_width,ll_height ll_width = Long(This.Object.p_photo_view.Width) ll_height = Long(This.Object.p_photo_view.Height) This.Object.p_photo_view.X = Integer((This.Width - ll_width )/2) This.Object.p_photo_view.Y = Integer((This.Height - ll_height)/2) This.SetRedraw(True) ib_DoNothing = False Return End If If ls_button_name = 'p_zoomin' Then ib_photo_moving = False ib_zoomin = Not ib_zoomin ib_zoomout = False If ib_zoomin Then This.Object.datawindow.Pointer = is_curs_zoomin This.Object.p_photo_view.Pointer = is_curs_zoomin Else This.Object.datawindow.Pointer = is_curs_moved This.Object.p_photo_view.Pointer = is_curs_moved End If End If If ls_button_name = 'p_zoomout' Then ib_photo_moving = False ib_zoomout = Not ib_zoomout ib_zoomin = False If ib_zoomout Then This.Object.datawindow.Pointer = is_curs_zoomout This.Object.p_photo_view.Pointer = is_curs_zoomout Else This.Object.datawindow.Pointer = is_curs_moved This.Object.p_photo_view.Pointer = is_curs_moved End If End If If ls_button_name = 'p_move' Then ib_zoomout = False ib_zoomin = False End If String ls_bn = "6",ls_bs = "5" If ib_zoomout Then ls_modify += ' p_zoomout.border="'+ls_bs+'" p_move.border="'+ls_bn+'" ' Else ls_modify += ' p_zoomout.border="'+ls_bn+'" ' End If If ib_zoomin Then ls_modify += ' p_zoomin.border ="'+ls_bs+'" p_move.border="'+ls_bn+'" ' Else ls_modify += ' p_zoomin.border ="'+ls_bn+'" ' End If If Not ib_zoomout And Not ib_zoomin Then ls_modify += ' p_move.border="'+ls_bs+'" ' Else ls_modify += ' p_move.border="'+ls_bn+'" ' End If This.Modify(ls_modify) ib_DoNothing = False end event event rbuttondown;String ls_bn = "6",ls_bs = "5" ,ls_modify ib_zoomout = False ib_zoomin = False If ib_zoomout Then ls_modify += ' p_zoomout.border="'+ls_bs+'" p_move.border="'+ls_bn+'" ' Else ls_modify += ' p_zoomout.border="'+ls_bn+'" ' End If If ib_zoomin Then ls_modify += ' p_zoomin.border ="'+ls_bs+'" p_move.border="'+ls_bn+'" ' Else ls_modify += ' p_zoomin.border ="'+ls_bn+'" ' End If If Not ib_zoomout And Not ib_zoomin Then ls_modify += ' p_move.border="'+ls_bs+'" ' Else ls_modify += ' p_move.border="'+ls_bn+'" ' End If This.Modify(ls_modify) This.Object.p_photo_view.Pointer = is_curs_moved This.Object.datawindow.Pointer = is_curs_moved ib_DoNothing = False end event |
Datawindow d_picture_view
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
release 10.5; datawindow(units=0 timer_interval=0 color=134217741 processing=0 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes print.preview.outline=yes hidegrayline=no ) header(height=4060 color="536870912" ) summary(height=0 color="536870912" ) footer(height=0 color="536870912" ) detail(height=4 color="536870912" ) table(column=(type=char(10) updatewhereclause=no name=name dbname="name" ) ) bitmap(band=header filename="" x="41" y="148" height="1008" width="1993" border="0" name=p_photo_view pointer="" visible="1" ) text(band=header alignment="1" text="100%" border="0" color="65535" x="1010" y="28" height="56" width="165" html.valueishtml="0" name=t_scale visible="1" font.face="Tahoma" font.height="-8" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" ) text(band=header alignment="2" text="9999" border="0" color="65535" x="873" y="28" height="56" width="110" html.valueishtml="0" name=t_posy visible="1" font.face="Tahoma" font.height="-8" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" ) text(band=header alignment="2" text="9999" border="0" color="65535" x="722" y="28" height="56" width="128" html.valueishtml="0" name=t_posx visible="1" font.face="Tahoma" font.height="-8" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" ) text(band=header alignment="0" text="Title" border="0" color="16777215" x="46" y="24" height="56" width="649" html.valueishtml="0" name=st_title pointer="Arrow!" visible="1" font.face="宋体" font.height="-9" font.weight="400" font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" ) bitmap(band=header filename="zoomin.bmp" x="1207" y="20" height="64" width="73" border="6" name=p_zoomin pointer="Arrow!" visible="1" ) bitmap(band=header filename="zoomout.bmp" x="1321" y="20" height="64" width="73" border="6" name=p_zoomout pointer="Arrow!" visible="1" ) bitmap(band=header filename="move.bmp" x="1435" y="20" height="64" width="73" border="5" name=p_move pointer="Arrow!" visible="1" ) button(band=header text="□" filename="" enabled=yes action="0" border="0" color="0" x="1550" y="16" height="80" width="96" vtextalign="0" htextalign="0" name=b_all pointer="Arrow!" visible="1" font.face="宋体" font.height="-9" font.weight="400" font.family="0" font.pitch="2" font.charset="134" background.mode="2" background.color="80269524" ) button(band=header text="◎" filename="" enabled=yes action="0" border="0" color="0" x="1678" y="16" height="80" width="96" vtextalign="0" htextalign="0" name=b_left pointer="Arrow!" visible="1" font.face="宋体" font.height="-9" font.weight="400" font.family="0" font.pitch="2" font.charset="134" background.mode="2" background.color="80269524" ) htmltable(border="1" ) htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" pagingmethod=0 generatedddwframes="1" ) xhtmlgen() cssgen(sessionspecific="0" ) xmlgen(inline="0" ) xsltgen() jsgen() export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 ) import.xml() export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" ) export.xhtml() |
w_main from window
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
forward global type w_main from window end type type p_1 from picture within w_main end type type cb_setbackcolor from commandbutton within w_main end type type st_2 from statictext within w_main end type type sle_title from singlelineedit within w_main end type type cb_select_file from commandbutton within w_main end type type st_1 from statictext within w_main end type type sle_pic_file from singlelineedit within w_main end type type dw_view from uo_picture_view within w_main end type end forward global type w_main from window integer width = 3141 integer height = 2184 boolean titlebar = true string title = "DataWindow Image Viewer Control" boolean controlmenu = true boolean minbox = true boolean maxbox = true boolean resizable = true long backcolor = 67108864 p_1 p_1 cb_setbackcolor cb_setbackcolor st_2 st_2 sle_title sle_title cb_select_file cb_select_file st_1 st_1 sle_pic_file sle_pic_file dw_view dw_view end type global w_main w_main forward prototypes public subroutine wf_show_picture (string as_pic_name, string as_title) public subroutine wf_center (window aw_window) end prototypes public subroutine wf_show_picture (string as_pic_name, string as_title);If Not FileExists(as_pic_name) Then Return p_1.PictureName = as_pic_name p_1.OriginalSize = True //dw_view.uf_setpicsize(pixelstounits(p_1.width,xpixelstounits!),pixelstounits(p_1.height,ypixelstounits!)) dw_view.uf_setpicsize(p_1.Width,p_1.Height) dw_view.uf_setfileName(as_pic_name) dw_view.uf_settitle(as_title) end subroutine public subroutine wf_center (window aw_window);//==================================================================== // Function: w_main.wf_center() //-------------------------------------------------------------------- // Description: Make the window appear in the center of the screen //-------------------------------------------------------------------- // Arguments: // value window aw_window window to be displayed //-------------------------------------------------------------------- // Returns: (none) //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2022/02/20 //-------------------------------------------------------------------- // Usage: w_main.wf_center ( window aw_window ) //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== Environment l_Env // get environment, in order to get screen size Integer li_Rtn li_Rtn = GetEnvironment(l_Env) // Determine whether the environment variable can be obtained correctly //DEBUG_ASSERT((li_Rtn=1),"Can't get Environment!") // convert screen pixels to pb uint Integer li_ScreenHeight, li_ScreenWidth li_ScreenWidth = PixelsToUnits(l_Env.ScreenWidth, XPixelsToUnits!) li_ScreenHeight = PixelsToUnits(l_Env.ScreenHeight, YPixelsToUnits!) // calc window postion Integer li_X, li_Y li_X = (li_ScreenWidth - aw_window.Width)/2 li_Y = (li_ScreenHeight - aw_window.Height)*2/5 // make it cool // repositioning window aw_window.Move(li_X, li_Y) end subroutine on w_main.create this.p_1=create p_1 this.cb_setbackcolor=create cb_setbackcolor this.st_2=create st_2 this.sle_title=create sle_title this.cb_select_file=create cb_select_file this.st_1=create st_1 this.sle_pic_file=create sle_pic_file this.dw_view=create dw_view this.Control[]={this.p_1,& this.cb_setbackcolor,& this.st_2,& this.sle_title,& this.cb_select_file,& this.st_1,& this.sle_pic_file,& this.dw_view} end on on w_main.destroy destroy(this.p_1) destroy(this.cb_setbackcolor) destroy(this.st_2) destroy(this.sle_title) destroy(this.cb_select_file) destroy(this.st_1) destroy(this.sle_pic_file) destroy(this.dw_view) end on event resize;dw_view.Width = WorkSpaceWidth() - dw_view.X *2 dw_view.Height = WorkSpaceHeight() - dw_view.Y - 8 end event event open;wf_center(This) dw_view.uf_setzoomscalestep(0.1) dw_view.uf_setzoomscale(1.0) wf_show_picture(sle_pic_file.text,sle_title.text) dw_view.event clicked(1680,18,0,dw_view.object.b_all) end event type p_1 from picture within w_main boolean visible = false integer x = 2290 integer width = 110 integer height = 88 boolean originalsize = true boolean focusrectangle = false end type type cb_setbackcolor from commandbutton within w_main integer x = 1737 integer y = 116 integer width = 923 integer height = 84 integer taborder = 30 integer textsize = -9 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" string text = "Random Background Color Settings" end type event clicked;dw_view.uf_setbackcolor(rgb(rand(255),rand(255),rand(255))) end event type st_2 from statictext within w_main integer x = 27 integer y = 112 integer width = 187 integer height = 52 integer textsize = -9 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 long backcolor = 67108864 string text = "Title:" boolean focusrectangle = false end type type sle_title from singlelineedit within w_main integer x = 215 integer y = 108 integer width = 1477 integer height = 80 integer taborder = 20 integer textsize = -9 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 string text = "picview.bmp" borderstyle borderstyle = stylelowered! end type event modified;dw_view.uf_settitle(sle_title.text) end event type cb_select_file from commandbutton within w_main integer x = 1737 integer y = 8 integer width = 306 integer height = 88 integer taborder = 20 integer textsize = -9 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" string text = "Choose..." end type event clicked;string ls_PathName,ls_FileName integer li_Rtn li_Rtn = GetFileOpenName("Select image file", ls_PathName, ls_FileName,'bmp',& "Supported image formats,*.jpg;*.bmp;*.gif;*.rle;*.wmf,"+& "Bitmap(.bmp),*.bmp,"+& "JPEG(.jpg;.jpeg),*.jpg;*.jpeg,"+& "RunLengthEncode(.rle),*.rle,"+& "Windows MetaFile(.wmf),*.wmf") IF li_Rtn <> 1 THEN return sle_pic_file.text = ls_PathName sle_title.text = ls_FileName wf_show_picture(ls_pathName,ls_fileName) end event type st_1 from statictext within w_main integer x = 27 integer y = 20 integer width = 187 integer height = 52 integer textsize = -9 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 long backcolor = 67108864 string text = "File:" boolean focusrectangle = false end type type sle_pic_file from singlelineedit within w_main integer x = 215 integer y = 12 integer width = 1477 integer height = 80 integer taborder = 10 integer textsize = -9 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 string text = "picview.bmp" borderstyle borderstyle = stylelowered! end type event modified;wf_show_picture(this.text,sle_title.text) end event type dw_view from uo_picture_view within w_main integer x = 9 integer y = 216 integer width = 2574 integer height = 1300 integer taborder = 10 boolean titlebar = false boolean resizable = false borderstyle borderstyle = stylelowered! end type |
Find Projects On Github click here
Good Luck!
Picture view is pretty awesome. Thanks for sharing!