topic
stringlengths
1
63
text
stringlengths
1
577k
resize a column to multiline in xbrowse
Rao, When I try your XbrColMaxHeight() function, I always get 1 for DrawTextEx( hDC, cData, aRect, nOr( DT_CALCRECT, DT_WORDBREAK ) ) eventhough cData does contains varying length of strings. How to fix this?
resize a column to multiline in xbrowse
Just before using DrawTextEx() function write to log file values of hDC, cData and aRect and verify if they are valid values. You may use FWLOG hDC, cData, aRect You can see the results in <exename>.log
resize a column to multiline in xbrowse
This is what I got Rao, [code=fw:2gk4r828]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #000000;">09</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">45</span>:<span style="color: #000000;">26</span>: <span style="color: #000000;">XBRCOLMAXHEIGHT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span> hDC = <span style="color: #000000;">755048059</span> cData = <span style="color: #000000;">&#91;</span>Purchase transactions which disregarded under GST legislation <span style="color: #000000;">&#40;</span>e.g. purchase within GST group registration<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>   aRect = TRECT   <br /><span style="color: #000000;">09</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">45</span>:<span style="color: #000000;">26</span>: <span style="color: #000000;">XBRCOLMAXHEIGHT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span> hDC = <span style="color: #000000;">755048059</span> cData = <span style="color: #000000;">&#91;</span>Imports under special scheme with no GST incurred <span style="color: #000000;">&#40;</span>e.g. Approved Trader Scheme, ATMS Scheme<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">&#93;</span> aRect = TRECT   <br /><span style="color: #000000;">09</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">45</span>:<span style="color: #000000;">26</span>: <span style="color: #000000;">XBRCOLMAXHEIGHT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span> hDC = <span style="color: #000000;">755048059</span> cData = <span style="color: #000000;">&#91;</span>Purchase <span style="color: #0000ff;">from</span> non GST-registered supplier with no GST incurred.<span style="color: #000000;">&#93;</span>   aRect = TRECT   <br /><span style="color: #000000;">09</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">45</span>:<span style="color: #000000;">26</span>: <span style="color: #000000;">XBRCOLMAXHEIGHT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span> hDC = <span style="color: #000000;">755048059</span> cData = <span style="color: #000000;">&#91;</span>Purchase transactions which is out <span style="color: #0000ff;">of</span> the scope <span style="color: #0000ff;">of</span> GST legislation <span style="color: #000000;">&#40;</span>e.g. purchase <span style="color: #0000ff;">of</span> goods overseas<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">&#93;</span> aRect = TRECT   <br /><span style="color: #000000;">09</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">45</span>:<span style="color: #000000;">26</span>: <span style="color: #000000;">XBRCOLMAXHEIGHT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span> hDC = <span style="color: #000000;">755048059</span> cData = <span style="color: #000000;">&#91;</span>Purchase <span style="color: #0000ff;">from</span> GST-registered supplier with no GST incurred. <span style="color: #000000;">&#40;</span>e.g. supplier provides transportation <span style="color: #0000ff;">of</span> goods that qualify as international services<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">&#93;</span>  aRect = TRECT   <br /><span style="color: #000000;">09</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">45</span>:<span style="color: #000000;">26</span>: <span style="color: #000000;">XBRCOLMAXHEIGHT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span> hDC = <span style="color: #000000;">755048059</span> cData = <span style="color: #000000;">&#91;</span>Any adjustment made <span style="color: #0000ff;">to</span> Input Tax e.g.: <span style="color: #000000;">Bad</span> Debt Relief & other input tax adjustment.<span style="color: #000000;">&#93;</span>  aRect = TRECT   <br /><span style="color: #000000;">09</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">45</span>:<span style="color: #000000;">26</span>: <span style="color: #000000;">XBRCOLMAXHEIGHT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span> hDC = <span style="color: #000000;">755048059</span> cData = <span style="color: #000000;">&#91;</span>Purchases with GST incurred but not claimable <span style="color: #000000;">&#40;</span>Disallowance <span style="color: #0000ff;">of</span> Input Tax<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span>e.g. medical expenses <span style="color: #00C800;">for</span> staff<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">&#93;</span>  aRect = TRECT   <br /><span style="color: #000000;">09</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">45</span>:<span style="color: #000000;">26</span>: <span style="color: #000000;">XBRCOLMAXHEIGHT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span> hDC = <span style="color: #000000;">755048059</span> cData = <span style="color: #000000;">&#91;</span>GST incurred <span style="color: #00C800;">for</span> import <span style="color: #0000ff;">of</span> goods.<span style="color: #000000;">&#93;</span> aRect = TRECT   <br /><span style="color: #000000;">09</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">45</span>:<span style="color: #000000;">26</span>: <span style="color: #000000;">XBRCOLMAXHEIGHT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span> hDC = <span style="color: #000000;">755048059</span> cData = <span style="color: #000000;">&#91;</span>Purchases with GST incurred <span style="color: #00C800;">at</span> <span style="color: #000000;">6</span>% and directly attributable <span style="color: #0000ff;">to</span> taxable supplies.<span style="color: #000000;">&#93;</span>  aRect = TRECT   <br /><span style="color: #000000;">09</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">45</span>:<span style="color: #000000;">26</span>: <span style="color: #000000;">XBRCOLMAXHEIGHT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span> hDC = <span style="color: #000000;">755048059</span> cData = <span style="color: #000000;">&#91;</span>GST incurred directly attributable <span style="color: #0000ff;">to</span> incidental exempt supplies.<span style="color: #000000;">&#93;</span> aRect = TRECT   <br /><span style="color: #000000;">09</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">45</span>:<span style="color: #000000;">26</span>: <span style="color: #000000;">XBRCOLMAXHEIGHT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span> hDC = <span style="color: #000000;">755048059</span> cData = <span style="color: #000000;">&#91;</span>GST incurred directly attributable <span style="color: #0000ff;">to</span> non-incidental exempt supplies.<span style="color: #000000;">&#93;</span> aRect = TRECT   <br /><span style="color: #000000;">09</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">45</span>:<span style="color: #000000;">26</span>: <span style="color: #000000;">XBRCOLMAXHEIGHT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span> hDC = <span style="color: #000000;">755048059</span> cData = <span style="color: #000000;">&#91;</span>GST incurred that is not directly attributable <span style="color: #0000ff;">to</span> taxable or exempt supplies.<span style="color: #000000;">&#93;</span> aRect = TRECT   <br /><span style="color: #000000;">09</span>/<span style="color: #000000;">03</span>/<span style="color: #000000;">2015</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">45</span>:<span style="color: #000000;">26</span>: <span style="color: #000000;">XBRCOLMAXHEIGHT</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span> hDC = <span style="color: #000000;">755048059</span> cData = <span style="color: #000000;">&#91;</span>Purchases exempted <span style="color: #0000ff;">from</span> GST. E.g. purchase <span style="color: #0000ff;">of</span> residential property or financial services.<span style="color: #000000;">&#93;</span> aRect = TRECT   <br /> </div>[/code:2gk4r828] Thank you very much for your assistance.
resize a column to multiline in xbrowse
Ok Thanks. In the code above, please see the line [code=fw:dn2m1rab]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; aRect &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := oBrw:<span style="color: #000000;">DataRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />&nbsp;</div>[/code:dn2m1rab] Please change it as [code=fw:dn2m1rab]<div class="fw" id="{CB}" style="font-family: monospace;"> &nbsp; aRect &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; := oBrw:<span style="color: #000000;">DataRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">aRect</span><br />&nbsp;</div>[/code:dn2m1rab] and try.
resize a column to multiline in xbrowse
Rao, aRect now has an array of coordinates but nMaxHeight is not adequate to show more than 1 line [code=fw:27wjao3h]<div class="fw" id="{CB}" style="font-family: monospace;">XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1426134517</span>  cData = <span style="color: #000000;">&#91;</span>Purchase transactions which disregarded under GST legislation <span style="color: #000000;">&#40;</span>e.g. purchase within GST group registration<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>   aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>                                       <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1426134517</span>  cData = <span style="color: #000000;">&#91;</span>Imports under special scheme with no GST incurred <span style="color: #000000;">&#40;</span>e.g. Approved Trader Scheme, ATMS Scheme<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">&#93;</span>  aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>                                                      <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1426134517</span>  cData = <span style="color: #000000;">&#91;</span>Purchase <span style="color: #0000ff;">from</span> non GST-registered supplier with no GST incurred.<span style="color: #000000;">&#93;</span>  aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>                                                                                    <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1426134517</span>  cData = <span style="color: #000000;">&#91;</span>Purchase transactions which is out <span style="color: #0000ff;">of</span> the scope <span style="color: #0000ff;">of</span> GST legislation <span style="color: #000000;">&#40;</span>e.g. purchase <span style="color: #0000ff;">of</span> goods overseas<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">&#93;</span>   aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>                                             <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1426134517</span>  cData = <span style="color: #000000;">&#91;</span>Purchase <span style="color: #0000ff;">from</span> GST-registered supplier with no GST incurred. <span style="color: #000000;">&#40;</span>e.g. supplier provides transportation <span style="color: #0000ff;">of</span> goods that qualify as international services<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">&#93;</span> aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span><br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1426134517</span>  cData = <span style="color: #000000;">&#91;</span>Any adjustment made <span style="color: #0000ff;">to</span> Input Tax e.g.: <span style="color: #000000;">Bad</span> Debt Relief & other input tax adjustment.<span style="color: #000000;">&#93;</span>  aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>                                                               <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1426134517</span>  cData = <span style="color: #000000;">&#91;</span>Purchases with GST incurred but not claimable <span style="color: #000000;">&#40;</span>Disallowance <span style="color: #0000ff;">of</span> Input Tax<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span>e.g. medical expenses <span style="color: #00C800;">for</span> staff<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">&#93;</span>  aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>                                       <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1426134517</span>  cData = <span style="color: #000000;">&#91;</span>GST incurred <span style="color: #00C800;">for</span> import <span style="color: #0000ff;">of</span> goods.<span style="color: #000000;">&#93;</span>  aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>                                                                                                                  <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1426134517</span>  cData = <span style="color: #000000;">&#91;</span>Purchases with GST incurred <span style="color: #00C800;">at</span> <span style="color: #000000;">6</span>% and directly attributable <span style="color: #0000ff;">to</span> taxable supplies.<span style="color: #000000;">&#93;</span>   aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>                                                                  <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1426134517</span>  cData = <span style="color: #000000;">&#91;</span>GST incurred directly attributable <span style="color: #0000ff;">to</span> incidental exempt supplies.<span style="color: #000000;">&#93;</span>   aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>                                                                                 <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1426134517</span>  cData = <span style="color: #000000;">&#91;</span>GST incurred directly attributable <span style="color: #0000ff;">to</span> non-incidental exempt supplies.<span style="color: #000000;">&#93;</span>  aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>                                                                              <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1426134517</span>  cData = <span style="color: #000000;">&#91;</span>GST incurred that is not directly attributable <span style="color: #0000ff;">to</span> taxable or exempt supplies.<span style="color: #000000;">&#93;</span>   aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>                                                                     <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">843</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1426134517</span>  cData = <span style="color: #000000;">&#91;</span>Purchases exempted <span style="color: #0000ff;">from</span> GST. E.g. purchase <span style="color: #0000ff;">of</span> residential property or financial services.<span style="color: #000000;">&#93;</span>   aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>                                                         <br /> </div>[/code:27wjao3h] [img:27wjao3h]http&#58;//s9&#46;postimg&#46;org/jy5yo3scv/help_screen_xbrowse&#46;jpg[/img:27wjao3h] Thank you
resize a column to multiline in xbrowse
Can you please add another line of code to log the result of nMaxHeight after calling the drawtestex(...)
resize a column to multiline in xbrowse
Here you go Rao, [code=fw:1odbllmn]<div class="fw" id="{CB}" style="font-family: monospace;">XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">845</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1224811279</span>  cData = <span style="color: #000000;">&#91;</span>Purchase transactions which disregarded under GST legislation <span style="color: #000000;">&#40;</span>e.g. purchase within GST group registration<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>   aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>  nMaxHeight = <span style="color: #000000;">30</span>                                       <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">845</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1224811279</span>  cData = <span style="color: #000000;">&#91;</span>Imports under special scheme with no GST incurred <span style="color: #000000;">&#40;</span>e.g. Approved Trader Scheme, ATMS Scheme<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">&#93;</span>  aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>  nMaxHeight = <span style="color: #000000;">30</span>                                                      <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">845</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1224811279</span>  cData = <span style="color: #000000;">&#91;</span>Purchase <span style="color: #0000ff;">from</span> non GST-registered supplier with no GST incurred.<span style="color: #000000;">&#93;</span>  aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>  nMaxHeight = <span style="color: #000000;">30</span>                                                                                    <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">845</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1224811279</span>  cData = <span style="color: #000000;">&#91;</span>Purchase transactions which is out <span style="color: #0000ff;">of</span> the scope <span style="color: #0000ff;">of</span> GST legislation <span style="color: #000000;">&#40;</span>e.g. purchase <span style="color: #0000ff;">of</span> goods overseas<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">&#93;</span>   aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>  nMaxHeight = <span style="color: #000000;">30</span>                                             <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">845</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1224811279</span>  cData = <span style="color: #000000;">&#91;</span>Purchase <span style="color: #0000ff;">from</span> GST-registered supplier with no GST incurred. <span style="color: #000000;">&#40;</span>e.g. supplier provides transportation <span style="color: #0000ff;">of</span> goods that qualify as international services<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">&#93;</span> aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>  nMaxHeight = <span style="color: #000000;">30</span><br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">845</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1224811279</span>  cData = <span style="color: #000000;">&#91;</span>Any adjustment made <span style="color: #0000ff;">to</span> Input Tax e.g.: <span style="color: #000000;">Bad</span> Debt Relief & other input tax adjustment.<span style="color: #000000;">&#93;</span>  aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>  nMaxHeight = <span style="color: #000000;">30</span>                                                               <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">845</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1224811279</span>  cData = <span style="color: #000000;">&#91;</span>Purchases with GST incurred but not claimable <span style="color: #000000;">&#40;</span>Disallowance <span style="color: #0000ff;">of</span> Input Tax<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#40;</span>e.g. medical expenses <span style="color: #00C800;">for</span> staff<span style="color: #000000;">&#41;</span>.<span style="color: #000000;">&#93;</span>  aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>  nMaxHeight = <span style="color: #000000;">30</span>                                       <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">845</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1224811279</span>  cData = <span style="color: #000000;">&#91;</span>GST incurred <span style="color: #00C800;">for</span> import <span style="color: #0000ff;">of</span> goods.<span style="color: #000000;">&#93;</span>  aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>  nMaxHeight = <span style="color: #000000;">30</span>                                                                                                                  <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">845</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1224811279</span>  cData = <span style="color: #000000;">&#91;</span>Purchases with GST incurred <span style="color: #00C800;">at</span> <span style="color: #000000;">6</span>% and directly attributable <span style="color: #0000ff;">to</span> taxable supplies.<span style="color: #000000;">&#93;</span>   aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>  nMaxHeight = <span style="color: #000000;">30</span>                                                                  <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">845</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1224811279</span>  cData = <span style="color: #000000;">&#91;</span>GST incurred directly attributable <span style="color: #0000ff;">to</span> incidental exempt supplies.<span style="color: #000000;">&#93;</span>   aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>  nMaxHeight = <span style="color: #000000;">30</span>                                                                                 <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">845</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1224811279</span>  cData = <span style="color: #000000;">&#91;</span>GST incurred directly attributable <span style="color: #0000ff;">to</span> non-incidental exempt supplies.<span style="color: #000000;">&#93;</span>  aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>  nMaxHeight = <span style="color: #000000;">30</span>                                                                              <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">845</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1224811279</span>  cData = <span style="color: #000000;">&#91;</span>GST incurred that is not directly attributable <span style="color: #0000ff;">to</span> taxable or exempt supplies.<span style="color: #000000;">&#93;</span>   aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>  nMaxHeight = <span style="color: #000000;">30</span>                                                                     <br />XBRCOLMAXHEIGHT<span style="color: #000000;">&#40;</span> <span style="color: #000000;">845</span> <span style="color: #000000;">&#41;</span>  hDC = <span style="color: #000000;">1224811279</span>  cData = <span style="color: #000000;">&#91;</span>Purchases exempted <span style="color: #0000ff;">from</span> GST. E.g. purchase <span style="color: #0000ff;">of</span> residential property or financial services.<span style="color: #000000;">&#93;</span>   aRect = <span style="color: #000000;">&#123;</span><span style="color: #000000;">22</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">335</span>,<span style="color: #000000;">684</span><span style="color: #000000;">&#125;</span>  nMaxHeight = <span style="color: #000000;">30</span>                                                         <br /> </div>[/code:1odbllmn] Not sure whether the font assigned to xBrowse is relevant to this issue but if it is here is the font object: [code=fw:1odbllmn]<div class="fw" id="{CB}" style="font-family: monospace;">FUNC UD_MFont<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />     <span style="color: #00C800;">LOCAL</span> oFont<br /><br />     <span style="color: #00C800;">LOCAL</span> nWidth,                   ;<br />           nHeight,                  ;<br />           lFromUser,                ;<br />           lBold,                    ;<br />           nEscapement,              ;<br />           nOrientation,             ;<br />           nWeight,                  ;<br />           lItalic,                  ;<br />           lUnderline,               ;<br />           lStrikeOut,               ;<br />           nCharSet,                 ;<br />           nOutPrecision,            ;<br />           nClipPrecision,           ;<br />           nQuality,                 ;<br />           oDevice<br /><br />     cFaceName      := <span style="color: #ff0000;">"SYSTEM_FIXED_FONT"</span> <span style="color: #B900B9;">//"COURIER NEW"</span><br />     nWidth         := <span style="color: #000000;">0</span><br />     nHeight        := <span style="color: #000000;">-10</span><br />     lFromUser      := <span style="color: #00C800;">FALSE</span><br />     lBold          := <span style="color: #00C800;">TRUE</span><br />     nEscapement    := <span style="color: #000000;">0</span><br />     nOrientation   := <span style="color: #000000;">0</span><br />     nWeight        := <span style="color: #000000;">500</span><br />     lItalic        := <span style="color: #00C800;">FALSE</span><br />     lUnderline     := <span style="color: #00C800;">FALSE</span><br />     lStrikeOut     := <span style="color: #00C800;">FALSE</span><br />     nCharSet       := <span style="color: #000000;">1</span><br />     nOutPrecision  := <span style="color: #000000;">3</span><br />     nClipPrecision := <span style="color: #000000;">2</span><br />     nQuality       := <span style="color: #000000;">0</span><br /><br /><br />     oFont := TFONT<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">NEW</span><span style="color: #000000;">&#40;</span> cFaceName,      ;<br />                           nWidth,         ;<br />                           nHeight,        ;<br />                           lFromUser,      ;<br />                           lBold,          ;<br />                           nEscapement,    ;<br />                           nOrientation,   ;<br />                           nWeight,        ;<br />                           lItalic,        ;<br />                           lUnderline,     ;<br />                           lStrikeOut,     ;<br />                           nCharSet,       ;<br />                           nOutPrecision,  ;<br />                           nClipPrecision, ;<br />                           nQuality        ;<br />                         <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> oFont<br /> </div>[/code:1odbllmn]
resize a column to multiline in xbrowse
I need to see the full code.
resize a column to multiline in xbrowse
Ok Rao. I'll try to build a self contained example.
resize a column to multiline in xbrowse
Rao, here is the self-contained example PRG [code=fw:pe7zy93k]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> DT_WORDBREAK                0x00000010<br /><span style="color: #00D7D7;">#define</span> DT_CALCRECT                 0x00000400<br /><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">local</span> oMFont1 := UD_MFont<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, oBrw, oDlg, aBrwData, nCnt1, bInit<br /><br />  CreateDbf<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />  use taxcode <span style="color: #00C800;">new</span> exclusive<br />  aBrwData := <span style="color: #000000;">&#123;</span>                            ;<br />                <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"taxcode"</span>, <span style="color: #ff0000;">" Code "</span>       <span style="color: #000000;">&#125;</span>,   ;<br />                <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"perc"</span>   , <span style="color: #ff0000;">" Tax Rate"</span>    <span style="color: #000000;">&#125;</span>,   ;<br />                <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"desc"</span>   , <span style="color: #ff0000;">" Description"</span> <span style="color: #000000;">&#125;</span>    ;<br />              <span style="color: #000000;">&#125;</span><br /><br />  <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"xHelp"</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Select"</span> <span style="color: #0000ff;">FONT</span> oMFont1<br /><br />  <span style="color: #0000ff;">REDEFINE</span> COLUMN <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">ID</span> <span style="color: #000000;">13</span> <span style="color: #0000ff;">OF</span> oDlg                ;<br />    <span style="color: #0000ff;">COLOR</span> CLR_BLACK, CLR_YELLOW                             ;<br />    <span style="color: #0000ff;">FONT</span> oMFont1 LINES<br /><br />    with object oBrw<br />         :<span style="color: #000000;">l2007</span> := .f.<br />         :<span style="color: #000000;">lRecordSelector</span> := .f.<br />         :<span style="color: #000000;">nMarqueeStyle</span>  := MARQSTYLE_HIGHLROW<br />         :<span style="color: #000000;">bClrHeader</span>     := <span style="color: #000000;">&#123;</span> ||  <span style="color: #000000;">&#123;</span> CLR_YELLOW, CLR_BLUE <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />         :<span style="color: #000000;">bClrSelFocus</span>   := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_WHITE, CLR_CYAN  <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />         :<span style="color: #000000;">lAllowColSwapping</span>   := .f.<br />         :<span style="color: #000000;">lAllowColHiding</span>     := .f.<br />    end<br /><br />  oBrw:<span style="color: #000000;">blDblClick</span>   := <span style="color: #000000;">&#123;</span> || oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br />  oBrw:<span style="color: #000000;">lHScroll</span>     := .t.<br />  oBrw:<span style="color: #000000;">nStretchCol</span>  := STRETCHCOL_WIDEST <span style="color: #B900B9;">//2</span><br />  oBrw:<span style="color: #000000;">bKeyDown</span>     := <span style="color: #000000;">&#123;</span> | nKey | <span style="color: #00C800;">IF</span><span style="color: #000000;">&#40;</span> GetKeyState<span style="color: #000000;">&#40;</span> VK_RETURN <span style="color: #000000;">&#41;</span>,                 ;<br />                                        <span style="color: #000000;">&#40;</span>                                      ;<br />                                           oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>                          ;<br />                                        <span style="color: #000000;">&#41;</span>,                                     ;<br />                                        <span style="color: #00C800;">nil</span>                                    ;<br />                                    <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /><br /><span style="color: #00C800;">FOR</span> nCnt1 := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> LEN<span style="color: #000000;">&#40;</span> aBrwData <span style="color: #000000;">&#41;</span><br />    ADD COLUMN <span style="color: #0000ff;">TO</span> oBrw                                   ;<br />        <span style="color: #00C800;">DATA</span>   &<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"{||"</span> + aBrwData<span style="color: #000000;">&#91;</span> nCnt1, <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span> + <span style="color: #ff0000;">"}"</span> <span style="color: #000000;">&#41;</span>   ;<br />        HEADER aBrwData<span style="color: #000000;">&#91;</span> nCnt1, <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span><br /><span style="color: #00C800;">NEXT</span><br /><br />oBrw:<span style="color: #000000;">nFreeze</span> := nCnt1 - <span style="color: #000000;">1</span><br /><br />bInit := <||<br />             oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span>:<span style="color: #000000;">cDataType</span> := <span style="color: #ff0000;">"M"</span><br />             oBrw:<span style="color: #000000;">nRowHeight</span> := XbrColMaxHeight<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <span style="color: #000000;">&#41;</span><br />             oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />         ><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span>                       ;<br />   <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> eval<span style="color: #000000;">&#40;</span>bInit<span style="color: #000000;">&#41;</span><br /><br />oMFont1 :<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------</span><br /><span style="color: #00C800;">function</span> CreateDbf<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />  <span style="color: #00C800;">local</span> aCodes := <span style="color: #000000;">&#123;</span>   ;<br />                     <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"TX    "</span>,<span style="color: #ff0000;">"6%"</span>,<span style="color: #ff0000;">"Purchases with GST incurred at 6% and directly attributable to taxable supplies."</span><span style="color: #000000;">&#125;</span>, ;<br />                     <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"IM    "</span>,<span style="color: #ff0000;">"6%"</span>,<span style="color: #ff0000;">"GST incurred for import of goods."</span><span style="color: #000000;">&#125;</span>, ;<br />                     <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"IS    "</span>,<span style="color: #ff0000;">"0%"</span>,<span style="color: #ff0000;">"Imports under special scheme with no GST incurred (e.g. Approved Trader Scheme, ATMS Scheme)."</span><span style="color: #000000;">&#125;</span>, ;<br />                     <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"BL    "</span>,<span style="color: #ff0000;">"6%"</span>,<span style="color: #ff0000;">"Purchases with GST incurred but not claimable (Disallowance of Input Tax) (e.g. medical expenses for staff)."</span><span style="color: #000000;">&#125;</span>, ;<br />                     <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"NR    "</span>,<span style="color: #ff0000;">"0%"</span>,<span style="color: #ff0000;">"Purchase from non GST-registered supplier with no GST incurred."</span><span style="color: #000000;">&#125;</span>, ;<br />                     <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"ZP    "</span>,<span style="color: #ff0000;">"0%"</span>,<span style="color: #ff0000;">"Purchase from GST-registered supplier with no GST incurred. (e.g. supplier provides transportation of goods that qualify as international services)."</span><span style="color: #000000;">&#125;</span>, ;<br />                     <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"EP    "</span>,<span style="color: #ff0000;">"0%"</span>,<span style="color: #ff0000;">"Purchases exempted from GST. E.g. purchase of residential property or financial services."</span><span style="color: #000000;">&#125;</span>, ;<br />                     <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"OP    "</span>,<span style="color: #ff0000;">"0%"</span>,<span style="color: #ff0000;">"Purchase transactions which is out of the scope of GST legislation (e.g. purchase of goods overseas)."</span><span style="color: #000000;">&#125;</span>, ;<br />                     <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"TX-E43"</span>,<span style="color: #ff0000;">"6%"</span>,<span style="color: #ff0000;">"GST incurred directly attributable to incidental exempt supplies."</span><span style="color: #000000;">&#125;</span>, ;<br />                     <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"TX-N43"</span>,<span style="color: #ff0000;">"6%"</span>,<span style="color: #ff0000;">"GST incurred directly attributable to non-incidental exempt supplies."</span><span style="color: #000000;">&#125;</span>, ;<br />                     <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"TX-RE "</span>,<span style="color: #ff0000;">"6%"</span>,<span style="color: #ff0000;">"GST incurred that is not directly attributable to taxable or exempt supplies."</span><span style="color: #000000;">&#125;</span>, ;<br />                     <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"GP    "</span>,<span style="color: #ff0000;">"0%"</span>,<span style="color: #ff0000;">"Purchase transactions which disregarded under GST legislation (e.g. purchase within GST group registration)"</span><span style="color: #000000;">&#125;</span>, ;<br />                     <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"AJP   "</span>,<span style="color: #ff0000;">"6%"</span>,<span style="color: #ff0000;">"Any adjustment made to Input Tax e.g.: Bad Debt Relief & other input tax adjustment."</span><span style="color: #000000;">&#125;</span> ;<br />                  <span style="color: #000000;">&#125;</span><br />  <span style="color: #00C800;">local</span> aRec<br /><br />  <span style="color: #00C800;">if</span> !file<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"taxcode.dbf"</span><span style="color: #000000;">&#41;</span><br />     dbCreate<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"taxcode"</span>, <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"taxcode"</span>, <span style="color: #ff0000;">"c"</span>, <span style="color: #000000;">6</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>, ;<br />                           <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"perc"</span>   , <span style="color: #ff0000;">"c"</span>, <span style="color: #000000;">2</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>, ;<br />                           <span style="color: #000000;">&#123;</span><span style="color: #ff0000;">"desc"</span>   , <span style="color: #ff0000;">"m"</span>,<span style="color: #000000;">10</span>, <span style="color: #000000;">0</span><span style="color: #000000;">&#125;</span>  ;<br />                         <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><br /><br />     use taxcode <span style="color: #00C800;">new</span> exclusive<br />     <span style="color: #00C800;">for</span> each aRec in aCodes<br />         append blank<br />         field->taxcode := aRec<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span><br />         field->perc    := aRec<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br />         field->desc    := aRec<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span><br />     <span style="color: #00C800;">next</span><br />     use<br />  <span style="color: #00C800;">endif</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------</span><br /><span style="color: #00C800;">function</span> XbrColMaxHeight<span style="color: #000000;">&#40;</span> oCol <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #00C800;">local</span> oBrw, hDC<br />   <span style="color: #00C800;">local</span> nLeft, nHeight, nRight, nWidth<br />   <span style="color: #00C800;">local</span> cData, oFont, aRect<br />   <span style="color: #00C800;">local</span> uSave, nMaxHeight, nCurrentHeight<br /><br />   oBrw              := oCol:<span style="color: #000000;">oBrw</span><br />   nMaxHeight        := <span style="color: #000000;">0</span><br />   nLeft             := oCol:<span style="color: #000000;">nDisplayCol</span><br />   nRight            := <span style="color: #0000ff;">Min</span><span style="color: #000000;">&#40;</span> nLeft + oCol:<span style="color: #000000;">nWidth</span>, oBrw:<span style="color: #000000;">BrwWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> - <span style="color: #000000;">5</span> <span style="color: #000000;">&#41;</span><br />   <span style="color: #00C800;">if</span> nRight - nLeft < <span style="color: #000000;">10</span><br />      <span style="color: #00C800;">return</span> oBrw:<span style="color: #000000;">nRowHeight</span><br />   <span style="color: #00C800;">endif</span><br /><br />   hDC               := oBrw:<span style="color: #000000;">GetDC</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />   oFont             := <span style="color: #00C800;">If</span><span style="color: #000000;">&#40;</span> ValType<span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">oDataFont</span> <span style="color: #000000;">&#41;</span> == <span style="color: #ff0000;">'B'</span>, Eval<span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">oDataFont</span> <span style="color: #000000;">&#41;</span>, oCol:<span style="color: #000000;">oDataFont</span> <span style="color: #000000;">&#41;</span><br />   oFont:<span style="color: #0000ff;">Activate</span><span style="color: #000000;">&#40;</span> hDC <span style="color: #000000;">&#41;</span><br />   aRect             := oBrw:<span style="color: #000000;">DataRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #000000;">aRect</span><br />   aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">2</span> <span style="color: #000000;">&#93;</span>        := nLeft<br />   aRect<span style="color: #000000;">&#91;</span> <span style="color: #000000;">4</span> <span style="color: #000000;">&#93;</span>        := nRight<br />   uSave             := oBrw:<span style="color: #000000;">BookMark</span><br />   oBrw:<span style="color: #000000;">GoTop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   REPEAT<br /><br />      cData          := Trim<span style="color: #000000;">&#40;</span> cValToChar<span style="color: #000000;">&#40;</span> Eval<span style="color: #000000;">&#40;</span> oCol:<span style="color: #000000;">bStrData</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />      <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> cData <span style="color: #000000;">&#41;</span><br />         nCurrentHeight := DrawTextEx<span style="color: #000000;">&#40;</span> hDC, cData, aRect, nOr<span style="color: #000000;">&#40;</span> DT_CALCRECT, DT_WORDBREAK <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />         nMaxHeight  := <span style="color: #0000ff;">Max</span><span style="color: #000000;">&#40;</span> nCurrentHeight, nMaxHeight <span style="color: #000000;">&#41;</span><br />         *FWLOG hDC, cData, aRect, nMaxHeight<br />      <span style="color: #00C800;">endif</span><br />      <span style="color: #B900B9;">// not handling bitmap width, indent, if any.</span><br /><br />   UNTIL oBrw:<span style="color: #000000;">Skip</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span> != <span style="color: #000000;">1</span><br /><br />   oBrw:<span style="color: #000000;">BookMark</span>     := uSave<br /><span style="color: #00C800;">return</span> nMaxHeight<br /><span style="color: #B900B9;">//----------------------------------------------------------------------</span><br />FUNC UD_MFont<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />     <span style="color: #00C800;">LOCAL</span> oFont<br /><br />     <span style="color: #00C800;">LOCAL</span> nWidth,                   ;<br />           nHeight,                  ;<br />           lFromUser,                ;<br />           lBold,                    ;<br />           nEscapement,              ;<br />           nOrientation,             ;<br />           nWeight,                  ;<br />           lItalic,                  ;<br />           lUnderline,               ;<br />           lStrikeOut,               ;<br />           nCharSet,                 ;<br />           nOutPrecision,            ;<br />           nClipPrecision,           ;<br />           nQuality,                 ;<br />           oDevice<br /><br />     <span style="color: #00C800;">local</span> cFaceName      := <span style="color: #ff0000;">"SYSTEM_FIXED_FONT"</span><br />     nWidth         := <span style="color: #000000;">0</span><br />     nHeight        := <span style="color: #000000;">-10</span><br />     lFromUser      := .f.<br />     lBold          := .t.<br />     nEscapement    := <span style="color: #000000;">0</span><br />     nOrientation   := <span style="color: #000000;">0</span><br />     nWeight        := <span style="color: #000000;">500</span><br />     lItalic        := .f.<br />     lUnderline     := .f.<br />     lStrikeOut     := .f.<br />     nCharSet       := <span style="color: #000000;">1</span><br />     nOutPrecision  := <span style="color: #000000;">3</span><br />     nClipPrecision := <span style="color: #000000;">2</span><br />     nQuality       := <span style="color: #000000;">0</span><br /><br /><br />     oFont := TFONT<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">NEW</span><span style="color: #000000;">&#40;</span> cFaceName,      ;<br />                           nWidth,         ;<br />                           nHeight,        ;<br />                           lFromUser,      ;<br />                           lBold,          ;<br />                           nEscapement,    ;<br />                           nOrientation,   ;<br />                           nWeight,        ;<br />                           lItalic,        ;<br />                           lUnderline,     ;<br />                           lStrikeOut,     ;<br />                           nCharSet,       ;<br />                           nOutPrecision,  ;<br />                           nClipPrecision, ;<br />                           nQuality        ;<br />                         <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> oFont<br /> </div>[/code:pe7zy93k] RC [code=fw:pe7zy93k]<div class="fw" id="{CB}" style="font-family: monospace;">xHELP <span style="color: #0000ff;">DIALOG</span> <span style="color: #000000;">26</span>, <span style="color: #000000;">43</span>, <span style="color: #000000;">498</span>, <span style="color: #000000;">265</span><br />EXSTYLE WS_EX_DLGMODALFRAME<br /><span style="color: #0000ff;">STYLE</span> DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_DLGFRAME | WS_SYSMENU<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">10</span>, <span style="color: #ff0000;">"System"</span><br /><span style="color: #000000;">&#123;</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">13</span>, <span style="color: #ff0000;">"txbrowse"</span>, WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | WS_TABSTOP, <span style="color: #000000;">12</span>, <span style="color: #000000;">36</span>, <span style="color: #000000;">420</span>, <span style="color: #000000;">176</span><br /> CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">401</span>, <span style="color: #ff0000;">"STATIC"</span>, SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, <span style="color: #000000;">13</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">225</span>, <span style="color: #000000;">9</span><br /><span style="color: #000000;">&#125;</span><br /> </div>[/code:pe7zy93k]
resize a column to multiline in xbrowse
Any solution Rao?
resize a column to multiline in xbrowse
I could not look into this due to other preoccupations. I shall get back to you soon.
resize a column to multiline in xbrowse
Ok. No problem Rao <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
resize a dialog from resources
To All I have been asked to allow my dialog embeded with 2 xbrowses from resource to be able to maximize. Is there a way to auto-resize the dialog and the elements within the resource ? Thanks Rick Lipkin [url=http&#58;//imageshack&#46;us/photo/my-images/683/rick1p&#46;jpg/:f460eyzf][img:f460eyzf]http&#58;//img683&#46;imageshack&#46;us/img683/3363/rick1p&#46;jpg[/img:f460eyzf][/url:f460eyzf] [url=http&#58;//imageshack&#46;us/photo/my-images/263/rick2&#46;jpg/:f460eyzf][img:f460eyzf]http&#58;//img263&#46;imageshack&#46;us/img263/4660/rick2&#46;jpg[/img:f460eyzf][/url:f460eyzf] [code=fw:f460eyzf]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush FILENAME <span style="color: #000000;">&#40;</span>cDEFA+<span style="color: #ff0000;">"<span style="color: #000000;">\g</span>rey.bmp"</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">ICON</span> oICO <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"WORLD"</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oGRPS <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"VENDOR"</span> ;<br />       <span style="color: #0000ff;">ICON</span> oICO                   ;<br />       <span style="color: #0000ff;">TITLE</span> cTITLE <span style="color: #0000ff;">BRUSH</span> oBrush TRANSPARENT<br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">xBROWSE</span> oLBX1                ;<br />       RECORDSET oRsWeb                  ;<br />       COLUMNS <span style="color: #ff0000;">"Run_This"</span>,               ;<br />               <span style="color: #ff0000;">"URL"</span>                     ;<br />       COLSIZES <span style="color: #000000;">30</span>,<span style="color: #000000;">200</span>                   ;<br />       HEADERS <span style="color: #ff0000;">"Run"</span>,                    ;<br />               <span style="color: #ff0000;">"Web Site to Search"</span>      ;<br />       <span style="color: #0000ff;">ID</span> <span style="color: #000000;">111</span> <span style="color: #0000ff;">of</span> oGrps                   ;<br />       AUTOSORT FASTEDIT LINES CELL<br /><br />       oLbx1:<span style="color: #000000;">bClrRowFocus</span>    := <span style="color: #000000;">&#123;</span> || <span style="color: #000000;">&#123;</span> CLR_BLACK, RGB<span style="color: #000000;">&#40;</span><span style="color: #000000;">185</span>,<span style="color: #000000;">220</span>,<span style="color: #000000;">255</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#125;</span><br />       oLbx1:<span style="color: #000000;">nMarqueeStyle</span>   := MARQSTYLE_HIGHLROWMS<br /><br />       <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">&#40;</span> oCol := oLbx1:<span style="color: #000000;">oCol</span><span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Run"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br />            oCol:<span style="color: #000000;">SetCheck</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">&#123;</span> <span style="color: #ff0000;">"ON"</span>, <span style="color: #ff0000;">"OFF"</span> <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br />            oCol:<span style="color: #000000;">cSortOrder</span>  := <span style="color: #00C800;">nil</span><br />          <span style="color: #B900B9;">//  oCol:lBmpStretch = .T.</span><br />       <span style="color: #00C800;">endif</span><br /><br />       AEVAL<span style="color: #000000;">&#40;</span> oLbx1:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">nEditType</span> := EDIT_GET <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span><br /><br />       * COLSIZES <span style="color: #000000;">30</span>,<span style="color: #000000;">30</span>,<span style="color: #000000;">30</span>,<span style="color: #000000;">100</span>,<span style="color: #000000;">30</span>,<span style="color: #000000;">30</span>       ;<br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">xBROWSE</span> oLBX2                ;<br />       ARRAY aResults                    ;<br />       COLUMNS <span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">4</span>,<span style="color: #000000;">5</span>,<span style="color: #000000;">6</span>               ;<br />       HEADERS <span style="color: #ff0000;">"Site"</span>,                   ;<br />               <span style="color: #ff0000;">"Part"</span>,                   ;<br />               <span style="color: #ff0000;">"Name"</span>,                   ;<br />               <span style="color: #ff0000;">"Desc"</span>,                   ;<br />               <span style="color: #ff0000;">"Price"</span>,                  ;<br />               <span style="color: #ff0000;">"Qty"</span>                     ;<br />       <span style="color: #0000ff;">ID</span> <span style="color: #000000;">121</span> <span style="color: #0000ff;">of</span> oGrps                   ;<br />       AUTOSORT <span style="color: #0000ff;">AUTOCOLS</span> FASTEDIT LINES CELL<br /><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oPARTS   <span style="color: #0000ff;">VAR</span> cPARTS   <span style="color: #0000ff;">ID</span> <span style="color: #000000;">115</span> <span style="color: #0000ff;">of</span> oGRPS <span style="color: #0000ff;">PICTURE</span> <span style="color: #ff0000;">"@!"</span><span style="color: #0000ff;">UPDATE</span><br />    <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> oSAY     <span style="color: #0000ff;">var</span> cSAY     <span style="color: #0000ff;">ID</span> <span style="color: #000000;">113</span> <span style="color: #0000ff;">of</span> oGRPS READONLY <span style="color: #0000ff;">COLOR</span> <span style="color: #ff0000;">"N/W"</span><br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBTN1 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">112</span> <span style="color: #0000ff;">of</span> oGrps  <span style="color: #B900B9;">//    ;    // add files</span><br />    *   <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> _FileView<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"A"</span><span style="color: #000000;">&#41;</span>,;<br />    *            oLBX1:<span style="color: #0000ff;">REFRESH</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, SysReFresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />    *            oLBX1:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBTN2 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">114</span> <span style="color: #0000ff;">of</span> oGrps  <span style="color: #B900B9;">//  ;    // edit files</span><br />     *  <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> _FileView<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"E"</span><span style="color: #000000;">&#41;</span>, ;<br />     *           oLBX1:<span style="color: #0000ff;">REFRESH</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, SysReFresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,;<br />     *           oLBX1:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBTN3 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">119</span> <span style="color: #0000ff;">of</span> oGrps  <span style="color: #B900B9;">//  ;    // del files</span><br />     *  <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> Delete_Um<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBTN10 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">124</span> <span style="color: #0000ff;">of</span> oGrps  <span style="color: #B900B9;">// ;    // view log file</span><br />    *   <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> WaitRun<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"NOTEPAD.EXE ERRORLOG.TXT"</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBTN5 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">117</span> <span style="color: #0000ff;">of</span> oGrps    ;    <span style="color: #B900B9;">// run</span><br />       <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> Search<span style="color: #000000;">&#40;</span> cPARTS,lVISABLE,oRsWeb,oSAY,cSAY,oLbx1,oLbx2 <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br />   <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBTN6 <span style="color: #0000ff;">ID</span> <span style="color: #000000;">118</span> <span style="color: #0000ff;">of</span> oGrps    ;    <span style="color: #B900B9;">// quit</span><br />       <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span> dbCloseAll<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />                oGrps:<span style="color: #000000;">END</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oGrps <span style="color: #0000ff;">NOWAIT</span>          ;<br />       <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span><span style="color: #000000;">&#40;</span> oLbx1:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,oParts:<span style="color: #000000;">Setfocus</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>,SysReFresh<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#41;</span>;<br />       <span style="color: #0000ff;">VALID</span> <span style="color: #000000;">&#40;</span> IIF<span style="color: #000000;">&#40;</span> !lOK, ExitPgm<span style="color: #000000;">&#40;</span>.T., oRsWeb, @aResults <span style="color: #000000;">&#41;</span>, .F. <span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><br /><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">&#40;</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span><br /> </div>[/code:f460eyzf]
resize a dialog from resources
Rick, You have to do it programmatically: [code=fw:1fk3xpys]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br />&nbsp; &nbsp; oDlg:<span style="color: #000000;">bResized</span> = <span style="color: #000000;">&#123;</span> | nSizeType, nWidth, nHeight | ResizeControls<span style="color: #000000;">&#40;</span> nSizeType, nWidth, nHeight, oDlg <span style="color: #000000;">&#41;</span> &nbsp;<span style="color: #000000;">&#125;</span><br /><br />...<br /><br /><span style="color: #00D7D7;">#define</span> SIZE_MAXIMIZED <span style="color: #000000;">2</span><br /><br /><span style="color: #00C800;">function</span> ResizeControls<span style="color: #000000;">&#40;</span> nSizeType, nWidth, nHeight, oDlg <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">if</span> nSizeType == SIZE_MAXIMIZED<br />&nbsp; &nbsp; &nbsp; oDlg:<span style="color: #000000;">aControls</span><span style="color: #000000;">&#91;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#93;</span>:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> nWidth - <span style="color: #000000;">10</span>, nHeight - <span style="color: #000000;">20</span> <span style="color: #000000;">&#41;</span><br />&nbsp; &nbsp; &nbsp; ...<br />&nbsp; &nbsp;<span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br />&nbsp;</div>[/code:1fk3xpys]
resize a dialog from resources
Antonio Thanks for your help .. I searched for bResized in the \samples folder and found several examples .. will try to work my way through the code. Appreciate your quick response. Rick Lipkin
resize a get field on GotFocus
Hello, How can I resize a get field on GotFocus? I want to change font on GotFocus – this is working. But with the bigger font I would need a larger get field. I tried with: oGetKonto7:Resize( 0, 200, 50 ) But this does not work. Best regards, Otto oGetKonto7:bGotFocus = { || oGetKonto7:Resize( 0, 200, 50 ), oGetKonto7:SetFont(Setup():oFntMetroFLATBTN ) ,oGetKonto7:nClrText( CLR_BLACK ),oGetKonto7:paint() }
resize a get field on GotFocus
Otto, [quote:3ijutyjb]oGetKonto7:bGotFocus = { || oGetKonto7:Resize( 0, 200, 50 ), ; oGetKonto7:SetFont(Setup():oFntMetroFLATBTN ) ,; oGetKonto7:nClrText( CLR_BLACK ),oGetKonto7:paint() } [/quote:3ijutyjb] [color=#0000FF:3ijutyjb][b:3ijutyjb]oGetKonto7:bGotFocus = { || oGetKonto7:nWidth := 200, oGetKonto7:nHeight := 50, ; oGetKonto7:SetFont(Setup():oFntMetroFLATBTN ) ,; oGetKonto7:nClrText( CLR_BLACK ), oGetKonto7:Refresh() } [/b:3ijutyjb][/color:3ijutyjb] or [color=#0000FF:3ijutyjb][b:3ijutyjb]oGetKonto7:Setcolor( CLR_BLACK, ), [/b:3ijutyjb][/color:3ijutyjb] sample from RESOURCE [img:3ijutyjb]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Testget1&#46;jpg[/img:3ijutyjb] regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
resize a get field on GotFocus
Hallo Uwe, vielen Dank. Funktioniert super. Danke und liebe Grüße Otto
resize a get field on GotFocus
[quote="Otto":mfgmbac0]I tried with: oGetKonto7:Resize( 0, 200, 50 ) But this does not work.[/quote:mfgmbac0] [code=fw:mfgmbac0]<div class="fw" id="{CB}" style="font-family: monospace;">oGetKonto7:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">50</span> <span style="color: #000000;">&#41;</span></div>[/code:mfgmbac0] EMG
resize a get field on GotFocus
Hello Enrico, Using resize for lostFocus does not clear the background. 2nd codeblock is working. oGetKonto5:nWidth := 55 Thanks in advance Otto oGetKonto5:bLostFocus = { || oGetKonto5:SetSize( 55, 32 ),; oGetKonto5:SetFont(oFont ),; oGetKonto5:nClrText( CLR_OLIVE ),; oGetKonto5:paint() } oGetKonto5:bLostFocus = { || oGetKonto5:nWidth := 55,; oGetKonto5:nHeight := 28,, oGetKonto5:SetFont(oFont ),; oGetKonto5:nClrText( CLR_OLIVE ),; oGetKonto5:paint() }
resize a get field on GotFocus
[quote="Otto":3k9y9krg]Hello Enrico, Using resize for lostFocus does not clear the background.[/quote:3k9y9krg] Try [code=fw:3k9y9krg]<div class="fw" id="{CB}" style="font-family: monospace;">oGetKonto7:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">50</span>, .T. <span style="color: #000000;">&#41;</span></div>[/code:3k9y9krg] EMG
resize a get field on GotFocus
Enrico, thank you. This is working. Best regards, Otto
resize a get field on GotFocus
[img:1uk96s57]http&#58;//www&#46;atzwanger-software&#46;com/fw/resize&#46;jpg[/img:1uk96s57] Enrico, maybe you can help me too how to paint over the other get in the srceen. I mean the resized Get should overwrite the other one. Best regards, Otto
resize a get field on GotFocus
Otto, can you show me a reduced and self-contained sample showing the problem? EMG
resize a position with fw_drawimage
I use for bpainted a image (first) on another image( second) this function FW_DrawImage( hDC, "BTN_PNG_DAY", { 0, -3, 20, 20 } ) If the first Image is resize (more big or more small) how I can recalculate the position of the second image ? I 'mtrying... Local arrayBtn:= GetClientRect (oBtn) FW_DrawImage( hDC, "BTN_PNG_NOTE", { ; arrayBtn[1]+35,; arrayBtn[2]+30,; arrayBtn[3]+50,; arrayBtn[4]+50 } ) but not work ok
resize a position with fw_drawimage
any solution please ?
resize a position with fw_drawimage
SIlvio, there are different possible situations : resizing inside a group or just 2 images next each other ( see inside circle ) using a fixed space or calculated in relation to the zoom-factor I prefer using GDIPLUS because of possible exact calculations ( works great ). <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: --> Now I can zoom any control like shown / tested with the get <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> [img:7d8hijta]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Zoom22&#46;jpg[/img:7d8hijta] regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
resize a position with fw_drawimage
Uwe, I need another situation Uwe I have a btnbmp with a Png and up this some symbols also png when I resize the dialog the btnbmp are resized and the symbol are moved on another position for a sample look this image [img:1ukpwxcc]https&#58;//i&#46;postimg&#46;cc/BQpYWThV/yy&#46;png[/img:1ukpwxcc] I need to insert : 1. the number on a orange box 2. the symbol you see at left 3. and the 3 symbols you see on right ( sun, receipt and note) when I resize the dialog these symbols are not on the same position but are moved to another position to draw the sun I use ( the orange circle you see at right) FW_DrawImage( hDC, "BTN_PNG_DAY", { 0, -3, 20, 20 } ) when I resize the dialog [b:1ukpwxcc]this position { 0, -3, 20, 20 } is not good[/b:1ukpwxcc] and the sun is draw to another position [b:1ukpwxcc]as you can see here [/b:1ukpwxcc] [img:1ukpwxcc]https&#58;//i&#46;postimg&#46;cc/RCL5Fnsc/uiui&#46;png[/img:1ukpwxcc] [b:1ukpwxcc]How I can resolve it ?[/b:1ukpwxcc] I thinked to calculate the rect of btnbmp with Local arrayBtn:= GetClientRect (oBtn) but then I not Know how change the exactly position for that symbol I hope U understand now
resize a position with fw_drawimage
I think the wanted solution 3 embedded images inside the main-image everything zoomed and unzoomed keeping the exact positions. The same logic like used for windows but a dialog [img:lt57zkc5]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Zoom23&#46;jpg[/img:lt57zkc5] [b:lt57zkc5]Only a few lines of code [/b:lt57zkc5] <!-- s:!: --><img src="{SMILIES_PATH}/icon_exclaim.gif" alt=":!:" title="Exclamation" /><!-- s:!: --> [code=fw:lt57zkc5]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> ZOOM_ADJ<span style="color: #000000;">&#40;</span> oDlg, nImgRow, nImgCol, nImgSpace, nFactorW, nFactorH <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> oGraphics := Graphics<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span> <br /><span style="color: #00C800;">LOCAL</span> oImage := GDIBmp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> c_path1 + <span style="color: #ff0000;">"Olga.jpg"</span> <span style="color: #000000;">&#41;</span>, oImg<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> <br /><span style="color: #00C800;">LOCAL</span> nTop, nLeft, nFactor := <span style="color: #000000;">1</span><br /><span style="color: #00C800;">LOCAL</span> nWidth := oImage:<span style="color: #000000;">GetWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, nHeight := oImage:<span style="color: #000000;">GetHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, nSpace := <span style="color: #000000;">1</span><br /><br />oImg<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> := GDIBmp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> c_path1 + <span style="color: #ff0000;">"Paint.bmp"</span> <span style="color: #000000;">&#41;</span> <br />oImg<span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span> := GDIBmp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> c_path1 + <span style="color: #ff0000;">"Paint.bmp"</span> <span style="color: #000000;">&#41;</span> <br />oImg<span style="color: #000000;">&#91;</span><span style="color: #000000;">3</span><span style="color: #000000;">&#93;</span> := GDIBmp<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> c_path1 + <span style="color: #ff0000;">"Paint.bmp"</span> <span style="color: #000000;">&#41;</span> <br /><br /><span style="color: #00C800;">IF</span> nFactorW <> <span style="color: #000000;">1</span> <span style="color: #B900B9;">// width resized</span><br />    nFactor := nFactorW<br /><span style="color: #00C800;">ELSE</span><br />    nFactor := nFactorH<br /><span style="color: #00C800;">ENDIF</span><br /><br />nTop    := nImgRow * nFactor        <span style="color: #B900B9;">// start-position top</span><br />nLeft   := nImgCol * nFactor        <span style="color: #B900B9;">// start-position left</span><br />nOrgLeft    := nImgCol * nFactor        <span style="color: #B900B9;">// reset to left on new row</span><br /><br />nSpace  := nImgSpace * nFactor      <span style="color: #B900B9;">// zoomed space between images</span><br /><br />I := <span style="color: #000000;">1</span><br />X := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">FOR</span> I := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">8</span> <span style="color: #B900B9;">// 2 rows with 8 images</span><br />    X++<br />    oGraphics:<span style="color: #000000;">DrawImage</span><span style="color: #000000;">&#40;</span> oImage, nTop, nLeft, ;     <span style="color: #B900B9;">// image draw</span><br />                                        nWidth * nFactor, nHeight * nFactor <span style="color: #000000;">&#41;</span><br />    <span style="color: #B900B9;">// 1. sub- image  </span><br />    oGraphics:<span style="color: #000000;">DrawImage</span><span style="color: #000000;">&#40;</span> oImg<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>, nTop + <span style="color: #000000;">&#40;</span> <span style="color: #000000;">10</span> * nFactor <span style="color: #000000;">&#41;</span>, nLeft + <span style="color: #000000;">&#40;</span> <span style="color: #000000;">55</span>  * nFactor <span style="color: #000000;">&#41;</span>, ; <br />                                        <span style="color: #000000;">30</span> * nFactor, <span style="color: #000000;">30</span> * nFactor <span style="color: #000000;">&#41;</span><br />    <span style="color: #B900B9;">// 2. sub- image  </span><br />    oGraphics:<span style="color: #000000;">DrawImage</span><span style="color: #000000;">&#40;</span> oImg<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>, nTop + <span style="color: #000000;">&#40;</span> <span style="color: #000000;">45</span> * nFactor <span style="color: #000000;">&#41;</span>, nLeft + <span style="color: #000000;">&#40;</span> <span style="color: #000000;">55</span>  * nFactor <span style="color: #000000;">&#41;</span>, ; <br />                                        <span style="color: #000000;">30</span> * nFactor, <span style="color: #000000;">30</span> * nFactor <span style="color: #000000;">&#41;</span><br />    <span style="color: #B900B9;">// 3. sub- image  </span><br />    oGraphics:<span style="color: #000000;">DrawImage</span><span style="color: #000000;">&#40;</span> oImg<span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span>, nTop + <span style="color: #000000;">&#40;</span> <span style="color: #000000;">80</span> * nFactor <span style="color: #000000;">&#41;</span>, nLeft + <span style="color: #000000;">&#40;</span> <span style="color: #000000;">55</span>  * nFactor <span style="color: #000000;">&#41;</span>, ; <br />                                        <span style="color: #000000;">30</span> * nFactor, <span style="color: #000000;">30</span> * nFactor <span style="color: #000000;">&#41;</span><br /><br />    nImgCol := oImage:<span style="color: #000000;">GetWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> + nSpace       <span style="color: #B900B9;">// new col-pos each image horizontal</span><br />    nLeft   += nSpace + <span style="color: #000000;">&#40;</span> nWidth * nFactor <span style="color: #000000;">&#41;</span>        <span style="color: #B900B9;">// next image left position</span><br />    oGraphics:<span style="color: #000000;">destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        oGraphics := Graphics<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">&#40;</span> oDlg:<span style="color: #000000;">hDC</span> <span style="color: #000000;">&#41;</span><br />    <span style="color: #00C800;">IF</span> X = <span style="color: #000000;">4</span>                                    <span style="color: #B900B9;">// break after 4 images each row</span><br />                nTop    += nHeight * nFactor + nSpace   <span style="color: #B900B9;">// next row-position</span><br />        nLeft   := nOrgLeft<br />        X := <span style="color: #000000;">0</span><br />    <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">NEXT</span><br />oGraphics:<span style="color: #000000;">destroy</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:lt57zkc5] regards Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
resize a position with fw_drawimage
CAn run ok also with btnbmp control ?
resize a position with fw_drawimage
Silvio, with Btnbmp it is not possible to place sub-images on any position inside the button. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Maybe it is possible to add [color=#0000FF:cuvry2d2][b:cuvry2d2]clicked[/b:cuvry2d2][/color:cuvry2d2] like in TImage METHOD New( nTop, nLeft, nWidth, nHeight, cResName, cBmpFile, lNoBorder,; oWnd, [color=#0000FF:cuvry2d2][b:cuvry2d2]bLClicked, bRClicked[/b:cuvry2d2][/color:cuvry2d2], lScroll, lStretch, oCursor,; cMsg, lUpdate, bWhen, lPixel, bValid, lDesign, cVarName ) CLASS TImage regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
resize a position with fw_drawimage
[quote="ukoenig":39wwcmdl]Silvio, with Btnbmp it is not possible to place sub-images on any position inside the button. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> Maybe it is possible to add [color=#0000FF:39wwcmdl][b:39wwcmdl]clicked[/b:39wwcmdl][/color:39wwcmdl] like in TImage METHOD New( nTop, nLeft, nWidth, nHeight, cResName, cBmpFile, lNoBorder,; oWnd, [color=#0000FF:39wwcmdl][b:39wwcmdl]bLClicked, bRClicked[/b:39wwcmdl][/color:39wwcmdl], lScroll, lStretch, oCursor,; cMsg, lUpdate, bWhen, lPixel, bValid, lDesign, cVarName ) CLASS TImage regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->[/quote:39wwcmdl] Uwe, Sorry [b:39wwcmdl]on BTnBMP is possible to place sub-images inside on any position of the button[/b:39wwcmdl] you must make obtn:bPainted obtn:bPainted:= { |hDC,ps,oBtn| FW_DrawImage( hDC, "BTN_PNG_DAY", { 0, -3, 20, 20 } ) } uwe, see <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=35666&start=15&hilit=BTNBMP">viewtopic.php?f=3&t=35666&start=15&hilit=BTNBMP</a><!-- l --> from NagesRao [img:39wwcmdl]https&#58;//imagizer&#46;imageshack&#46;com/v2/xq90/924/GPKK0x&#46;png[/img:39wwcmdl]
resize a position with fw_drawimage
Silvio, I know with using FW_DrawImage is OK. What I mean is : the calculations are done using [color=#0000FF:b9d19v33][b:b9d19v33]GDIPLUS[/b:b9d19v33][/color:b9d19v33] I didn't test if it is possible to change from < FW_DrawImage > to < GDIPLUS > I will have a look at it. regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
resize a position with fw_drawimage
Silvio just as a information of the calculation logic. I'm using a resize-factor for zoom / unzoom First I have to detect if horizontal or vertical is resized resize-factor < 1 > belongs to the basic dialog-size. [code=fw:36ckucnk]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg2 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>, <span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL RESIZABLE <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"TESTS 9"</span> <span style="color: #0000ff;">OF</span> oSystem<br /><br />oDlg:<span style="color: #000000;">bPainted</span>  := <span style="color: #000000;">&#123;</span> || ZOOM_ADJ<span style="color: #000000;">&#40;</span> oDlg2, nImgRow, nImgCol, nImgSpace, nFactorW, nFactorH <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /> <br /><span style="color: #B900B9;">// 618 x 441 ( overall size ) = defined width + 18, hight + 41</span><br /><span style="color: #B900B9;">// + 18 and + 41 are fixed values for dialog header and border</span><br />oDlg:<span style="color: #000000;">bResized</span> = <span style="color: #000000;">&#123;</span> | nRow, nCol | ; <span style="color: #B900B9;">// select factor from resized width or hight</span><br />nFactorW := <span style="color: #000000;">1</span>, nFactorH := <span style="color: #000000;">1</span>, ; <span style="color: #B900B9;">// reset</span><br />IIF<span style="color: #000000;">&#40;</span> oDlg2:<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> > <span style="color: #000000;">620</span> .or. oDlg2:<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> < <span style="color: #000000;">615</span>, ;<br />     nFactorW := oDlg2:<span style="color: #000000;">nWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">618</span>, <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span>,;<br />IIF<span style="color: #000000;">&#40;</span> oDlg2:<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> > <span style="color: #000000;">445</span> .or. oDlg2:<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> < <span style="color: #000000;">438</span>, ;<br />     nFactorH := oDlg2:<span style="color: #000000;">nHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> / <span style="color: #000000;">441</span> , <span style="color: #00C800;">NIL</span> <span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#125;</span><br /><br /> </div>[/code:36ckucnk] regards Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
resize a position with fw_drawimage
Silvio, zooming buttons works but there is a problem ; images are not adjusted to the new burttonsize <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> borders and spaces are working [img:gumc4t6g]http&#58;//www&#46;pflegeplus&#46;com/IMAGES/Btnzoom1&#46;jpg[/img:gumc4t6g] regards Uwe
resize a position with fw_drawimage
How I can have the width and the Height of a btnbmp ?
resize a position with fw_drawimage
//------------- BMP-Brush ----------- FUNCTION DRAW_BMP( hDC, oBitmap, aColors, nColorSel ) LOCAL oBMPBrush, aGrad LOCAL [color=#0000FF:1bka0t46][b:1bka0t46]aRect := GETCLIENTRECT( oBitmap:hWnd )[/b:1bka0t46][/color:1bka0t46] IF nColorSel = 1 aGrad := { { .5, CLR_WHITE, aColors[2] }, { .5, aColors[2], CLR_BLACK } } ELSE aGrad := { { .5, CLR_WHITE, aColors[4] }, { .5, aColors[4], CLR_BLACK } } ENDIF DEFINE BRUSH oBMPBrush ; COLOR GradientFill( hDC, [color=#0000FF:1bka0t46][b:1bka0t46]0, 0, aRect[3], aRect[4][/b:1bka0t46][/color:1bka0t46] , aGrad, .T. ) // .T: = Vertical oBMPBrush:End() RETURN( NIL ) regards Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
resize browse when click maximized dialog
hi, I would like to maximized my browse when I click maximized on my dialog but dialog maximized and browse not... [code=fw:2ocwln05]<div class="fw" id="{CB}" style="font-family: monospace;"><br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg2 <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"SQL"</span> <span style="color: #0000ff;">FONT</span> oFont<br />        <br />        <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"ESPCAT"</span> ;<br />        COLUMNS <span style="color: #ff0000;">"CDFOR"</span> COLSIZES <span style="color: #000000;">70</span> HEADERS <span style="color: #ff0000;">"CODICE"</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">200</span> <span style="color: #0000ff;">OF</span> oDlg2<br />        <br />        ADD oCol <span style="color: #0000ff;">TO</span> oBrw <span style="color: #00C800;">AT</span> <span style="color: #000000;">2</span> <span style="color: #00C800;">DATA</span> espcat->CDPAR <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"ARTICOLO"</span>  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">LEFT</span><br />        ADD oCol <span style="color: #0000ff;">TO</span> oBrw <span style="color: #00C800;">AT</span> <span style="color: #000000;">3</span> <span style="color: #00C800;">DATA</span> espcat->DEPAR <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"DESCRIZIONE"</span>  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">300</span> <span style="color: #0000ff;">LEFT</span>     <br />        ADD oCol <span style="color: #0000ff;">TO</span> oBrw <span style="color: #00C800;">AT</span> <span style="color: #000000;">4</span> <span style="color: #00C800;">DATA</span> espcat->UNMIS <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"UM"</span>  <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">25</span> <span style="color: #0000ff;">LEFT</span><br />        <br />        WITH OBJECT oBrw<br />        :<span style="color: #000000;">nMarqueeStyle</span>       := MARQSTYLE_HIGHLROW<br />        :<span style="color: #000000;">nColDividerStyle</span>    := LINESTYLE_BLACK<br />        :<span style="color: #000000;">nRowDividerStyle</span>    := LINESTYLE_BLACK<br />        :<span style="color: #000000;">lColDividerComplete</span> := .T. <br />        :<span style="color: #000000;">lRecordSelector</span>     := .F.<br />        :<span style="color: #000000;">lHScroll</span>            := .T.<br />        :<span style="color: #000000;">lVScroll</span>            := .T.<br />        :<span style="color: #000000;">lExcelCellWise</span> := .t.<br />        END<br />        <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> BtnEsc <span style="color: #0000ff;">ID</span> <span style="color: #000000;">11</span> <span style="color: #0000ff;">OF</span> oDlg2            ;<br />            <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>oDlg2:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>                <br />        <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> BtnEsc <span style="color: #0000ff;">ID</span> <span style="color: #000000;">12</span> <span style="color: #0000ff;">OF</span> oDlg2 <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"EXCEL"</span>          ;<br />            <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">&#40;</span>oBrw:<span style="color: #000000;">ToExcel</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>                             <br /><br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">dialog</span> oDlg2 <span style="color: #0000ff;">CENTERED</span><br /> </div>[/code:2ocwln05] I created my dialog by Pelles C with class name TXBROWSE and in Custom control properties "resizable dialog" I put VERT RESIZING "RESIZING and HORZ RESIZING "RESIZING" any help? thank you ciao Damiano
resize browse when click maximized dialog
[code=fw:3krb7t77]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">nRightMargin</span> := <span style="color: #000000;">20</span><br />oBrw:<span style="color: #000000;">nBottomMargin</span> := <span style="color: #000000;">40</span> &nbsp;<span style="color: #B900B9;">// or whatever values in pixels</span></div>[/code:3krb7t77]
resize browse when click maximized dialog
hi Mr Rao, it work! now I have another problem, when I maximized the dialog, browse is ok but BTNBMP buttons remain in their posizion overlapping to the browse. ciao Damiano
resize browse when click maximized dialog
You need to move them with code in the ON RESIZE clause of the Dialog. Best way to have fully flexible dialogs is to create from source code and not with resources. OT: We recommend creating xbrowse as below and not to use ADD TO oBrw [code=fw:1k64prt3]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">ALIAS</span> <span style="color: #ff0000;">"ESPCAT"</span> ;<br />COLUMNS <span style="color: #ff0000;">"CDFOR"</span>, <span style="color: #ff0000;">"CDPAR"</span>, <span style="color: #ff0000;">"DEPAR"</span>, <span style="color: #ff0000;">"UNIMIS"</span> ;<br />HEADERS <span style="color: #ff0000;">"CDFOR"</span>, <span style="color: #ff0000;">"ARTICOLO"</span>, <span style="color: #ff0000;">"DESCRIZIONE"</span>, <span style="color: #ff0000;">"UM"</span> ;<br />COLSIZES <span style="color: #000000;">70</span>, <span style="color: #000000;">100</span>, <span style="color: #000000;">300</span>, <span style="color: #000000;">25</span> &nbsp;;<br /><span style="color: #0000ff;">ID</span> <span style="color: #000000;">200</span> <span style="color: #0000ff;">OF</span> oDlg2<br />&nbsp;</div>[/code:1k64prt3]
resize browse when click maximized dialog
thank you!!!
resize browse when click maximized dialog
This is an example of resizable dialog with adjusting controls when resized. [code=fw:24hc7yd5]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> RcBrowse<br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oBrw, oBtn1, oBtn2, oRect<br /><br />&nbsp; &nbsp;USE STATES &nbsp;<span style="color: #B900B9;">// use any DBF you have</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL ;<br />&nbsp; &nbsp;<span style="color: #0000ff;">STYLE</span> nOR<span style="color: #000000;">&#40;</span> DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WS_MAXIMIZEBOX, WS_MINIMIZEBOX, WS_THICKFRAME <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">80</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>,<span style="color: #000000;">-80</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE <span style="color: #ff0000;">"STATES"</span> <span style="color: #0000ff;">AUTOCOLS</span> NOBORDER<br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ &nbsp;<span style="color: #000000;">20</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">BUTTON</span> oBtn1 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"BtnOne"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">350</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">BUTTON</span> oBtn2 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Close"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">bResized</span> := <span style="color: #000000;">&#123;</span> || ;<br />&nbsp; &nbsp; &nbsp; oRect &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= oDlg:<span style="color: #000000;">GetCliRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; oBtn2:<span style="color: #000000;">nTop</span> &nbsp; &nbsp; := oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">50</span>, ;<br />&nbsp; &nbsp; &nbsp; oBtn2:<span style="color: #000000;">nLeft</span> &nbsp; &nbsp;:= oRect:<span style="color: #000000;">nRight</span> - <span style="color: #000000;">100</span>, ;<br />&nbsp; &nbsp; &nbsp; oBtn1:<span style="color: #000000;">nLeft</span> &nbsp; &nbsp;:= oRect:<span style="color: #000000;">nRight</span> - <span style="color: #000000;">100</span> &nbsp;<span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:24hc7yd5] Please build and run this program. You may use this as a template
resize browse when click maximized dialog
very good mr rao but I have FWH 12.01 and TRUEPIXEL do not work ciao Damiano
resize browse when click maximized dialog
Without TRUEPIXEL clause: [code=fw:1v22rf5v]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;<span style="color: #00C800;">local</span> oDlg, oBrw, oBtn1, oBtn2, oRect<br /><br />&nbsp; &nbsp;USE STATES<br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> ;<br />&nbsp; &nbsp;<span style="color: #0000ff;">STYLE</span> nOR<span style="color: #000000;">&#40;</span> DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; WS_MAXIMIZEBOX, WS_MINIMIZEBOX, WS_THICKFRAME <span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">40</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-10</span>,<span style="color: #000000;">-40</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; &nbsp; DATASOURCE <span style="color: #ff0000;">"STATES"</span> <span style="color: #0000ff;">AUTOCOLS</span> NOBORDER<br /><br />&nbsp; &nbsp;oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;@ &nbsp;<span style="color: #000000;">10</span>,<span style="color: #000000;">250</span> <span style="color: #0000ff;">BUTTON</span> oBtn1 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"BtnOne"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />&nbsp; &nbsp;@ <span style="color: #000000;">175</span>,<span style="color: #000000;">250</span> <span style="color: #0000ff;">BUTTON</span> oBtn2 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Close"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">40</span>,<span style="color: #000000;">15</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />&nbsp; &nbsp;oDlg:<span style="color: #000000;">bResized</span> := <span style="color: #000000;">&#123;</span> || ;<br />&nbsp; &nbsp; &nbsp; oRect &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;:= oDlg:<span style="color: #000000;">GetCliRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; oBtn2:<span style="color: #000000;">nTop</span> &nbsp; &nbsp; := oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">50</span>, ;<br />&nbsp; &nbsp; &nbsp; oBtn2:<span style="color: #000000;">nLeft</span> &nbsp; &nbsp;:= oRect:<span style="color: #000000;">nRight</span> - <span style="color: #000000;">100</span>, ;<br />&nbsp; &nbsp; &nbsp; oBtn1:<span style="color: #000000;">nLeft</span> &nbsp; &nbsp;:= oRect:<span style="color: #000000;">nRight</span> - <span style="color: #000000;">100</span> &nbsp;<span style="color: #000000;">&#125;</span><br /><br />&nbsp; &nbsp;<span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br />&nbsp;</div>[/code:1v22rf5v]
resize browse when click maximized dialog
thank you Mr Rao ciao Damiano
resize browse when click maximized dialog
[quote="nageswaragunupudi":1vwhke0a]This is an example of resizable dialog with adjusting controls when resized. [code=fw:1vwhke0a]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> RcBrowse<br /><br />   <span style="color: #00C800;">local</span> oDlg, oBrw, oBtn1, oBtn2, oRect<br /><br />   USE STATES  <span style="color: #B900B9;">// use any DBF you have</span><br /><br />   <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">600</span>,<span style="color: #000000;">400</span> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL ;<br />   <span style="color: #0000ff;">STYLE</span> nOR<span style="color: #000000;">&#40;</span> DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;<br />              WS_MAXIMIZEBOX, WS_MINIMIZEBOX, WS_THICKFRAME <span style="color: #000000;">&#41;</span><br /><br />   @ <span style="color: #000000;">80</span>,<span style="color: #000000;">20</span> <span style="color: #0000ff;">XBROWSE</span> oBrw <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-20</span>,<span style="color: #000000;">-80</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />      DATASOURCE <span style="color: #ff0000;">"STATES"</span> <span style="color: #0000ff;">AUTOCOLS</span> NOBORDER<br /><br />   oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   @  <span style="color: #000000;">20</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">BUTTON</span> oBtn1 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"BtnOne"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br />   @ <span style="color: #000000;">350</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">BUTTON</span> oBtn2 <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Close"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">80</span>,<span style="color: #000000;">30</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">ACTION</span> oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />   oDlg:<span style="color: #000000;">bResized</span> := <span style="color: #000000;">&#123;</span> || ;<br />      oRect          := oDlg:<span style="color: #000000;">GetCliRect</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, ;<br />      oBtn2:<span style="color: #000000;">nTop</span>     := oRect:<span style="color: #000000;">nBottom</span> - <span style="color: #000000;">50</span>, ;<br />      oBtn2:<span style="color: #000000;">nLeft</span>    := oRect:<span style="color: #000000;">nRight</span> - <span style="color: #000000;">100</span>, ;<br />      oBtn1:<span style="color: #000000;">nLeft</span>    := oRect:<span style="color: #000000;">nRight</span> - <span style="color: #000000;">100</span>  <span style="color: #000000;">&#125;</span><br /><br />   <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:1vwhke0a] Please build and run this program. You may use this as a template[/quote:1vwhke0a] Nages, it is very nice.
resize columnas xbrowse
Hola foro Quiero en un xbrowse que no se pueda modificar el ancho de la columna con el raton al posicionar el puntero en la linea que divide las columnas, he visto la clase, pero no he encontrado la data para ese dato, alguien sabra como evitar esto? salu2 paco
resize columnas xbrowse
No recuerdo muy bien, pero creo que es: [code=fw:291blcb7]<div class="fw" id="{CB}" style="font-family: monospace;">AEval<span style="color: #000000;">&#40;</span> oBrw:<span style="color: #000000;">aCols</span>, <span style="color: #000000;">&#123;</span> |o| o:<span style="color: #000000;">lAllowSizing</span> := .f. <span style="color: #000000;">&#125;</span> <span style="color: #000000;">&#41;</span></div>[/code:291blcb7]
resize columnas xbrowse
Gracias Byron funcionó, yo lo estaba probando oBrw:lAllowSizing := .f. y asi no funciona salu2 paco
resize16 dentro de un dialog en un folder
Estoy iniciando la migracion de una aplicación de 16 a 32 bits, dentro de los problemas que me han sucedido y viendo las respuestas en el foro, hasta ahora va todo relativamente bien, el tema es que los tamaños de los dialogs junto con los controles incluidos en los mismos se achican en la aplicacion de 32 bits, pero usando el resize16 en los dialogs pude solucionarlo parcialmente ya que tengo el mismo problema con los dialogs dentro de un folder y no se donde como usar el resize aqui ??, alguna sugerencia ??, espero no tener de redimensionar todos los dialogs del RC...saludos
resizing dialog defined from resource
Hello there!This is my first post here so please be gentle with your replies... <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) --> I defined a dialog from workshop that looks like this:......CBS_DETAIL DIALOG 1, 1, 100, 100STYLE WS_CHILD | WS_BORDERFONT 10, "Courier"{}......then in my .prg:......DEFINE DIALOG oDlg RESOURCE "CBS_DETAIL"; FROM 1,1 TO oChildWnd:oWndClient:nHeight - 1, oChildWnd:oWndClient:nWidth - 2; SIZE oChildWnd:oWndClient:nHeight - 1, oChildWnd:oWndClient:nWidth - 2; OF oChildWnd PIXEL ACTIVATE DIALOG oDlg NOWAIT......BUT STILL I CAN'T RESIZE IT....can anybody toss the salad for me here... it would be a great help.-i'm using FW2.4 and xHarbour 1.0bMy regards.
resizing dialog defined from resource
Was able to SOLVED IT!I add this:oRect := oChildWnd:oWndClient:GETCLIRECT()....and this:ACTIVATE WINDOW oChildWnd; ON INIT ( oDlg:Move( 1,1,oRect:nRight, oRect:nBottom, .T.) ....I hope this works with other controls too like oFolder define within dialog (as resource)....Is there better coding for this solution?THANKS! <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) -->
resizing dialog defined from resource
It is fine <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->You can also use oDlg:SetSize( nWidth, nHeight, lRepaint ) instead of Move()
resizing dialog defined from resource
Thanks so much senior Linares! <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) --> I also use oDlg:Resize(...) when I only need the dialog/object to expand.My best regards,Mr. Frances A. PadillaInternational Elevator & Equipment, Inc.<!-- w --><a class="postlink" href="http://www.iee.com.ph">www.iee.com.ph</a><!-- w -->
resizing images
Hello Antonio, I have used the new function SaveImageFromImage() and it works perfect. Here is the code I used. [code=fw:vp95qhsa]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> RK_SelectFoto<span style="color: #000000;">&#40;</span>nPlantnum<span style="color: #000000;">&#41;</span><br />*<span style="color: #0000ff;">to</span> <span style="color: #0000ff;">select</span> a <span style="color: #0000ff;">picture</span>, resize it and place it in the <span style="color: #0000ff;">right</span> <span style="color: #0000ff;">folder</span><br />*<span style="color: #000000;">28</span><span style="color: #000000;">-09</span><span style="color: #000000;">-2016</span><br /><br /><span style="color: #00C800;">LOCAL</span> oWndFoto, oBtnOK<br /><span style="color: #00C800;">LOCAL</span> oFoto<br /><span style="color: #00C800;">LOCAL</span> cFoto := <span style="color: #ff0000;">''</span><br /><span style="color: #00C800;">LOCAL</span> cKopie := <span style="color: #ff0000;">''</span><br /><span style="color: #00C800;">LOCAL</span> nMaxWidth := <span style="color: #000000;">1000</span><br /><span style="color: #00C800;">LOCAL</span> nMaxHeight := <span style="color: #000000;">800</span><br /><span style="color: #00C800;">LOCAL</span> nFotoWidth<br /><span style="color: #00C800;">LOCAL</span> nFotoHeight<br /><span style="color: #00C800;">LOCAL</span> nFactor := <span style="color: #000000;">0</span><br /><br />*choose photo<br />cFoto := ChooseFile<span style="color: #000000;">&#40;</span> <span style="color: #ff0000;">"Select an photo"</span>, <span style="color: #ff0000;">"jpg"</span> <span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">IF</span> LEN<span style="color: #000000;">&#40;</span>ALLTRIM<span style="color: #000000;">&#40;</span>cFoto<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> > <span style="color: #000000;">0</span><br />    nFoto++<br />    cKopie := cPath + <span style="color: #ff0000;">'/temp/'</span> + ALLTRIM<span style="color: #000000;">&#40;</span>STR<span style="color: #000000;">&#40;</span>nPlantnum+nFoto<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> + <span style="color: #ff0000;">'.jpg'</span><br /><br />*<span style="color: #0000ff;">define</span> a <span style="color: #0000ff;">window</span> <span style="color: #0000ff;">to</span> check the <span style="color: #0000ff;">size</span> <span style="color: #0000ff;">of</span> the photo<br />    <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oWndFoto <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"grote foto"</span> ;<br />        <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">800</span>, <span style="color: #000000;">800</span><br />        <br />        @ <span style="color: #000000;">40</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">IMAGE</span> oFoto FILENAME cFoto <span style="color: #0000ff;">OF</span> oWndFoto <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">640</span>, <span style="color: #000000;">480</span><br /><br />*check the <span style="color: #0000ff;">size</span> <span style="color: #0000ff;">of</span> the photo<br />        nFotoWidth := oFoto:<span style="color: #000000;">GetWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />        nFotoHeight := oFoto:<span style="color: #000000;">GetHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />*<span style="color: #00C800;">if</span> the photo is too wide, set the <span style="color: #0000ff;">right</span> width<br />        <span style="color: #00C800;">IF</span> nFotoWidth > <span style="color: #000000;">1000</span><br />            nFactor := <span style="color: #000000;">1000</span> / nFotoWidth<br />            nFotoWidth := <span style="color: #000000;">1000</span><br />            nFotoHeight  := <span style="color: #0000ff;">ROUND</span><span style="color: #000000;">&#40;</span>nFotoHeight * nFactor, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br />*<span style="color: #00C800;">if</span> the photo is still <span style="color: #0000ff;">to</span> high, set the <span style="color: #0000ff;">right</span> height<br />        <span style="color: #00C800;">IF</span> nFotoHeight > <span style="color: #000000;">800</span><br />            nFactor := <span style="color: #000000;">800</span> / nFotoHeight<br />            nFotoHeight := <span style="color: #000000;">800</span><br />            nFotoWidth  := <span style="color: #0000ff;">ROUND</span><span style="color: #000000;">&#40;</span>nFotoWidth * nFactor, <span style="color: #000000;">0</span><span style="color: #000000;">&#41;</span><br />        <span style="color: #00C800;">ENDIF</span><br /><br />*now rescale the <span style="color: #0000ff;">IMAGE</span><br />        oFoto:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> nFotoWidth, nFotoHeight <span style="color: #000000;">&#41;</span><br />                      oFoto:<span style="color: #000000;">SetScaling</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>  <br />        oWndFoto:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> nFotoWidth + <span style="color: #000000;">20</span>, nFotoHeight + <span style="color: #000000;">40</span> <span style="color: #000000;">&#41;</span><br /><br />        @ <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnOK <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Ok"</span> <span style="color: #0000ff;">OF</span> oWndFoto <span style="color: #0000ff;">ACTION</span> oWndFoto:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oWndFoto<br />    <br />    SaveImageFromImage<span style="color: #000000;">&#40;</span> cFoto, cKopie, nFotoWidth, nFotoHeight <span style="color: #000000;">&#41;</span><br />    <br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span><br /><br /> </div>[/code:vp95qhsa] Thanks for this new function Rene
resizing images
Glad to know that it is working fine many thanks for your great feedback <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
resizing window and image control
Hello, I have a function that shows a bigger image in a window. With the older libs (date 23-03-2018) it worked fine when I use the next code: [code=fw:djjo9zzs]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">FUNCTION</span> RK_FotoGroot<span style="color: #000000;">&#40;</span>cFoto<span style="color: #000000;">&#41;</span><br />*<span style="color: #0000ff;">to</span> show a big <span style="color: #0000ff;">picture</span>  <br /><br /><span style="color: #00C800;">LOCAL</span> oWndFoto, oBtnZoom<br /><span style="color: #00C800;">LOCAL</span> oFoto<br /><span style="color: #00C800;">LOCAL</span> nWidth := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> nHeight := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> nFotoWidth<br /><span style="color: #00C800;">LOCAL</span> nFotoHeight<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oWndFoto <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">'grote foto'</span> ;<br />    <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">800</span>, <span style="color: #000000;">800</span><br /><br />    @ <span style="color: #000000;">40</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">IMAGE</span> oFoto FILENAME cFoto <span style="color: #0000ff;">OF</span> oWndFoto <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">1000</span>, <span style="color: #000000;">1000</span><br /><br />    nFotoWidth := oFoto:<span style="color: #000000;">GetWidth</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />    nFotoHeight := oFoto:<span style="color: #000000;">GetHeight</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><br />    oFoto:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> nFotoWidth, nFotoHeight <span style="color: #000000;">&#41;</span><br />       oFoto:<span style="color: #000000;">SetScaling</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">&#41;</span>  <br />       <br />    oWndFoto:<span style="color: #000000;">SetSize</span><span style="color: #000000;">&#40;</span> nFotoWidth + <span style="color: #000000;">20</span>, nFotoHeight + <span style="color: #000000;">40</span> <span style="color: #000000;">&#41;</span><br />        <br />    @ <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BUTTON</span> oBtnZoom <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">'Ok'</span> <span style="color: #0000ff;">OF</span> oWndFoto <span style="color: #0000ff;">ACTION</span> oWndFoto:<span style="color: #000000;">End</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />       oBtnZoom:<span style="color: #000000;">SetPos</span><span style="color: #000000;">&#40;</span> <span style="color: #000000;">5</span>, oWndFoto:<span style="color: #000000;">nWidth</span> / <span style="color: #000000;">2</span> - oBtnZoom:<span style="color: #000000;">nWidth</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">&#41;</span>  <br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oWndFoto<br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:djjo9zzs] That gives the next result: [img:djjo9zzs]https&#58;//www&#46;plantenkennis&#46;com/FiveMac/image_old&#46;png[/img:djjo9zzs] With the newest lib this gives another result: [img:djjo9zzs]https&#58;//www&#46;plantenkennis&#46;com/FiveMac/image_new&#46;png[/img:djjo9zzs] If I look in the source of Windows.prg there si something strnage too? [code=fw:djjo9zzs]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /> <span style="color: #00C800;">METHOD</span> ChangeSize<span style="color: #000000;">&#40;</span>nNewHeight, nNewWidth<span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> WinSizeChange<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">hWnd</span>, nNewHeight, nNewWidth <span style="color: #000000;">&#41;</span> <br />   <br />   <span style="color: #00C800;">METHOD</span> SetSize<span style="color: #000000;">&#40;</span> nWidth, nHeight <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> WinSetSize<span style="color: #000000;">&#40;</span> ::<span style="color: #000000;">hWnd</span>, nWidth, nHeight <span style="color: #000000;">&#41;</span>  <br />   <br />   <span style="color: #00C800;">METHOD</span> SetSizeChange<span style="color: #000000;">&#40;</span>nNewHeight, nNewWidth <span style="color: #000000;">&#41;</span> <span style="color: #00C800;">INLINE</span> WinSetSizeChange<span style="color: #000000;">&#40;</span>::<span style="color: #000000;">hWnd</span>, nNewHeight, nNewWidth <span style="color: #000000;">&#41;</span> <br /> </div>[/code:djjo9zzs] As you can see METHOD ChangeSize and SetSize first have Height and than Width, While SetSize works with Width and than Height. Is this as it is ment to be?
resizing window and image control
[quote:271sjdy5] If I look in the source of Windows.prg there si something strnage too?[/quote:271sjdy5] Yes, I detect this , It would be easy to change it, but we would lose the retro compatibility in old programs ... I have seen the problem of the photos, is the new setsize method that overwrites setsize Tcontrol Method . I rename this method to Resize and setsize is now ok. New libs in <!-- m --><a class="postlink" href="https://www.dropbox.com/s/a3qlwm9lkhwy7ub/librerias.zip?dl=0">https://www.dropbox.com/s/a3qlwm9lkhwy7 ... s.zip?dl=0</a><!-- m --> The get problem is complex to solve for me ... I will try to improve it a bit <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Saludos.
resizing window and image control
Hello Manuel, Thanks for these new libs, the resizing is working OK now.
resolution of a JPG
Hello friends, How can I get the resolution of a JPG? I want to remember that I read here that it can be done without opening and reading the photo. Best regards, Otto
resolution of a JPG
Maybe this post ? [url:38jts0rr]http&#58;//forums&#46;fivetechsupport&#46;com/viewtopic&#46;php?f=3&t=16312&hilit=jpg+resolution&sid=3c21fef10f4377eed5600cb7087a1afd[/url:38jts0rr]
resolution of a JPG
Hello Marc, Thanks. With the help of your link, I remembered that I already solved the problem with modHarbour and a JS LIB. Thanks again. Should also work with WEBVIEW2. Here is the link to the library: [url:7h3708va]https&#58;//github&#46;com/exif-js/exif-js[/url:7h3708va] Best regards, Otto PS: That's where forensics starts. [img:7h3708va]https&#58;//mybergland&#46;com/exif&#46;jpg[/img:7h3708va]
resolution of a JPG
Hello Marc, now I remember. I wanted to program a working time recording. A display shows a clock with a QR code that changes every 10 sec. When an employee scans the QR code and follows the link, the photo is sent to the server and the metadata is read out. If the picture is older than e.g. 10 sec. then the server reports that the capture was not correct. This means that the employee must be on-site because he needs the current link and must send immediately. Best regards, Otto [img:3uslrmhl]https&#58;//mybergland&#46;com/arbeitszeiterfassung&#46;jpg[/img:3uslrmhl]
resolution of a JPG
... The program is still working: [url:2cnkv5z6]https&#58;//winhotel&#46;space/qrcodejs-master/index-svg&#46;prg[/url:2cnkv5z6] Best regards, Otto
resolution of a JPG
Great !
resolution of a JPG
Great !
resolution of a JPG
Dear Mr. Rao, Hearing that from you means a lot to me. Have a nice Sunday. Best regards, Otto
resolution of a JPG
[quote="Otto":kx5ruguh]Hello friends, How can I get the resolution of a JPG? I want to remember that I read here that it can be done without opening and reading the photo. Best regards, Otto[/quote:kx5ruguh] FWH function [code=fw:kx5ruguh]<div class="fw" id="{CB}" style="font-family: monospace;">JpegDim<span style="color: #000000;">&#40;</span> cFileJpg <span style="color: #000000;">&#41;</span> <span style="color: #B900B9;">// --> { nWidth, nHeight }</span></div>[/code:kx5ruguh] Source: fwh\source\function\imgtxtio.prg Ofc, can not provide as much information as the exif.js
resolution of a JPG
hi Otto, for Desktop App you can get Information of JPG File this Way [code=fw:185uvvh7]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.CH"</span><br />PROCEDURE MAIN<br />   <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">&#40;</span> hb_valToExp<span style="color: #000000;">&#40;</span> JpgMetaData<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"d:<span style="color: #000000;">\B</span>ilder<span style="color: #000000;">\N</span>ASA<span style="color: #000000;">\"</span>,"</span><span style="color: #000000;">02</span>-spitzer-smc.jpg<span style="color: #ff0000;">") ) )<br />RETURN<br /><br />FUNCTION JpgMetaData( cPath, cFilename )<br />LOCAL aRet     := {}<br />LOCAL nItem, ii,iMax<br />LOCAL objShell := CreateObject( "</span>Shell.Application<span style="color: #ff0000;">" )<br />LOCAL objFolder<br />LOCAL objFolderItem<br />LOCAL cFileInfo<br />LOCAL cHeaderInfo<br />LOCAL aItems := {176,178,175,177}<br /><br />   objFolder := objShell:Namespace( cPath )<br />   objFolderItem := objFolder:ParseName( cFilename )<br />   iMax := LEN(aItems)<br />   FOR ii := 1 TO iMax<br />      nItem := aItems[ii]<br />      cFileInfo := objFolder:GetDetailsOf( objFolderItem, nItem )<br />      cHeaderInfo := objFolder:GetDetailsOf( objFolder:Items, nItem )<br />      IF !EMPTY( cHeaderInfo ) .AND. !EMPTY( cFileInfo )<br />         AADD( aRet, { STRZERO( nItem, 3 ), cHeaderInfo, STRTRAN( cFileInfo , "</span>?<span style="color: #ff0000;">", "</span><span style="color: #ff0000;">" ) } )<br />      ENDIF<br />   NEXT<br /><br />   objFolderItem := NIL<br />   objFolder := NIL<br />   objShell := NIL<br /><br />RETURN ACLONE( aRet )</span></div>[/code:185uvvh7]
resource consumption
Hello FiveWinners. Is there any way to know that the application is consuming resources or resources are not releasing? regards
resource consumption
before to quit my application i have FERASE("CHECKRES.TXT") CHECKRES() i get a checkres.txt file showing the pending resources (if any and where it comes from) Hth
resource consumption
And besides what Richard has explained you, at the beginning of your app call SetResDebug( .T. )
resource error
[url=http&#58;//img59&#46;imageshack&#46;us/my&#46;php?image=errorepu3&#46;png:e7gml5tw][img:e7gml5tw]http&#58;//img59&#46;imageshack&#46;us/img59/7813/errorepu3&#46;th&#46;png[/img:e7gml5tw][/url:e7gml5tw] I use workshop borland. Why in some gets there is border : on the top there is a get with the same option but it not shoe the error I made a simply test the link it : <!-- w --><a class="postlink" href="http://www.postazioneuno.it/prova_er.zip">www.postazioneuno.it/prova_er.zip</a><!-- w --> Why it make it ?
resource error
Silvio, the border wiil disappear if you "redefine" every control in your source. Stefan
resource error
why it non make error for the first get ?
resource error
I don´t know, I had this error only, if I did not redefine the get. Maybe the folder has something to do with it. The first get is not in a folder. Stefan
resource error
if you create a dialog then you create a test programredefine dialog resource"test" and activate dialog you must see all the fields it has been always therefore because now is different?
resource workshop windows seven
Hello Has anyone succeeded installing Borland resource workshop under windows seven ? Thanks for your help, Richard
resource workshop windows seven
Richard, Here it works fine, just copying the installed files. Is you Windows 7 32 bits ? It will not run under 64 bits
resource workshop windows seven
Antonio unfortunately it is a 64 bits wonder why it does not run under vista or xp compatibility... gotta find a way to make it run or find a good replacement Thanks for the help,
resource workshop windows seven
Richard, 16 bits applications are not supported in Windows 64 bits Its a pity, but it is this way.
resource workshop windows seven
Antonio It is not clear to me. If i right click on computer, properties , it tells me system type 64 bits, so i guess it is a 64 bits version of seven , is there another way to make sure ? When i execute a very old version of my software (16 bits) it runs ok what am i missing ? Richard
resource workshop windows seven
Richard, Open the Windows Tasks Manager. If you see some of the running apps with a * (star) on the right side, then it means that you are using Windows 64 and those star marked apps are 32 bits ones
resource workshop windows seven
Antonio It is a 64 bits version The app i was trying to execute was 32 bits (though 7 years old), time passes by quickly. The only remaining option is to find a good replacement to borland Resource workshop I will go through the topic in this forum and probably ask what was the best choice for those who were in a similar case. Thanks for the help, Richard
resource workshop windows seven
Richard Give PELLES C a try. Is an excellent Resource Editor Last Version ( 6.0 ) works with no problem in Win7 64 Bits. I finished migrating all my Rc files to Pelles C, now I use it in Win7, Vista 64 bits and XP 32 Bits. Download it from here <!-- m --><a class="postlink" href="http://www.smorgasbordet.com/pellesc/">http://www.smorgasbordet.com/pellesc/</a><!-- m --> From Chile Adolfo
resource workshop windows seven
Adolfo Thanks for the hint, i will give it a try What do you mean by migrating RC files to Pelles C ? Is there anything special that has to be done in order to use existing resources with pelles C Thanks for your help Richard
resource workshop windows seven
[quote="Richard Chidiak":2tjno3nv] What do you mean by migrating RC files to Pelles C ? [/quote:2tjno3nv] Richard... By migrating.. I mean "opening" and reviewing, so far I didn't have any kind of problem with almost 50 different RC's created by Workshop. If yoiu need any help.. just contact me. From Chile Adolfo
resource workshop windows seven
Adolfo I have migrated to pelles c for my resources I have one problem inside folders, i can not highlight or select any field with the mouse, tabs or keyboard is OK Outside folders everything is OK I have looked into the properties , they seem ok, Have you been through a similar problem ? Thanks for the help, Richard
resource workshop windows seven
Richard Here you have an example.. The Container [code=fw:2ae2sfiw]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">FOLDER</span> <span style="color: #0000ff;">DIALOG</span> DISCARDABLE <span style="color: #000000;">45</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">451</span>, <span style="color: #000000;">266</span><br /><span style="color: #0000ff;">STYLE</span> WS_POPUP|DS_MODALFRAME|DS_3DLOOK|WS_CAPTION|WS_SYSMENU|WS_VISIBLE<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"Ms Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">199</span>, <span style="color: #ff0000;">"SysTabControl32"</span>, WS_TABSTOP, <span style="color: #000000;">4</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">440</span>, <span style="color: #000000;">224</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">201</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">300</span>, <span style="color: #000000;">232</span>, <span style="color: #000000;">68</span>, <span style="color: #000000;">28</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">202</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">376</span>, <span style="color: #000000;">232</span>, <span style="color: #000000;">68</span>, <span style="color: #000000;">28</span><br /><span style="color: #000000;">&#125;</span></div>[/code:2ae2sfiw] The folder itself [code=fw:2ae2sfiw]<div class="fw" id="{CB}" style="font-family: monospace;">FOLUSU2 <span style="color: #0000ff;">DIALOG</span> DISCARDABLE <span style="color: #000000;">108</span>, <span style="color: #000000;">49</span>, <span style="color: #000000;">394</span>, <span style="color: #000000;">200</span><br /><span style="color: #0000ff;">STYLE</span> WS_CHILD|DS_3DLOOK|WS_VISIBLE<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"Ms Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br />  CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"TXBrowse"</span>, WS_TABSTOP|0x00800000, <span style="color: #000000;">8</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">378</span>, <span style="color: #000000;">184</span><br /><span style="color: #000000;">&#125;</span><br /> </div>[/code:2ae2sfiw] From Chile Adolfo
resource workshop windows seven
Adolfo, My resource look quite the same except i do not have a xbrowse inside but common controls get..etc on all folders (i have several in my app) , the mouse is inactive on all controls inside folders ! Very strange Do you have a folder with standard controls (like get) where you can check if you have mouse control ? I Just recompiled on another computer with Borland RW and mouse control is ok, so surely something to do with Pelles c Strange, Thanks for the help, Richard
resource workshop windows seven
Richard Here you have one with gets, says.. etc [code=fw:3cbln4jd]<div class="fw" id="{CB}" style="font-family: monospace;">FOLUSU1 <span style="color: #0000ff;">DIALOG</span> DISCARDABLE <span style="color: #000000;">108</span>, <span style="color: #000000;">49</span>, <span style="color: #000000;">394</span>, <span style="color: #000000;">200</span><br /><span style="color: #0000ff;">STYLE</span> WS_CHILD|DS_3DLOOK|WS_VISIBLE<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"Ms Sans Serif"</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"CODIGO :"</span>, <span style="color: #000000;">4001</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">32</span>, <span style="color: #000000;">24</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">8</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"PASSWORD :"</span>, <span style="color: #000000;">4002</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">32</span>, <span style="color: #000000;">40</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">8</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"NOMBRE :"</span>, <span style="color: #000000;">4003</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">32</span>, <span style="color: #000000;">56</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">8</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"RUT :"</span>, <span style="color: #000000;">4004</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">32</span>, <span style="color: #000000;">72</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">8</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"DEPARTAMENTO :"</span>, <span style="color: #000000;">4005</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">32</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">8</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"DOMICILIO :"</span>, <span style="color: #000000;">4006</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">32</span>, <span style="color: #000000;">104</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">8</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"FONO :"</span>, <span style="color: #000000;">4007</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">32</span>, <span style="color: #000000;">120</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">8</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"CIUDAD :"</span>, <span style="color: #000000;">4008</span>, <span style="color: #ff0000;">"Static"</span>, SS_RIGHT|WS_GROUP, <span style="color: #000000;">32</span>, <span style="color: #000000;">136</span>, <span style="color: #000000;">64</span>, <span style="color: #000000;">8</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">101</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">104</span>, <span style="color: #000000;">22</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">12</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">102</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">104</span>, <span style="color: #000000;">38</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">12</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">103</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">104</span>, <span style="color: #000000;">54</span>, <span style="color: #000000;">250</span>, <span style="color: #000000;">12</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">104</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">104</span>, <span style="color: #000000;">70</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">12</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">105</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">104</span>, <span style="color: #000000;">86</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">12</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">106</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">104</span>, <span style="color: #000000;">102</span>, <span style="color: #000000;">252</span>, <span style="color: #000000;">12</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">107</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">104</span>, <span style="color: #000000;">118</span>, <span style="color: #000000;">88</span>, <span style="color: #000000;">12</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">108</span>, <span style="color: #ff0000;">"Edit"</span>, ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, <span style="color: #000000;">104</span>, <span style="color: #000000;">134</span>, <span style="color: #000000;">46</span>, <span style="color: #000000;">12</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">11</span>, <span style="color: #ff0000;">"Static"</span>, WS_GROUP, <span style="color: #000000;">156</span>, <span style="color: #000000;">136</span>, <span style="color: #000000;">194</span>, <span style="color: #000000;">8</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"Datos Personales"</span>, <span style="color: #000000;">4009</span>, <span style="color: #ff0000;">"Button"</span>, BS_GROUPBOX, <span style="color: #000000;">6</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">378</span>, <span style="color: #000000;">190</span><br /><span style="color: #000000;">&#125;</span></div>[/code:3cbln4jd] Which version of Pelles C do you have.. here it is 6.00.4 for 32bits.. working with no problem in win7 64 bits Adolfo
resource workshop windows seven
Adolfo same version of pelles c as yours 6.00.4 version 32 bits , windows seven 64 bits Can you please compile the following test and let me know if you can select any get field with the mouse ? Same code work Ok with BRW Thanks for your help, Richard [code=fw:j5rhuayc]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br /><span style="color: #00C800;">LOCAL</span> ODLG,OFLD, ;<br />&nbsp; &nbsp; &nbsp; DFIRST := SPACE<span style="color: #000000;">&#40;</span><span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; DLAST &nbsp;:= SPACE<span style="color: #000000;">&#40;</span><span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span>, ;<br />&nbsp; &nbsp; &nbsp; DDATE &nbsp;:= CTOD<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">""</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> ODLG <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"TESTFLD"</span><br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">FOLDER</span> oFld <span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> <span style="color: #0000ff;">OF</span> oDlg ;<br />&nbsp; &nbsp; <span style="color: #0000ff;">PROMPTS</span> <span style="color: #ff0000;">"&FOLDER1"</span>, <span style="color: #ff0000;">"&FOLDER2"</span> ;<br />&nbsp; &nbsp; <span style="color: #0000ff;">DIALOGS</span> <span style="color: #ff0000;">"TESTA1"</span>, <span style="color: #ff0000;">"TESTA2"</span> &nbsp;<span style="color: #0000ff;">ADJUST</span><br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> DFIRST <span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PICTURE</span> REPLICATE<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"!"</span>,<span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> DLAST &nbsp;<span style="color: #0000ff;">ID</span> <span style="color: #000000;">202</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">1</span><span style="color: #000000;">&#93;</span> <span style="color: #0000ff;">PICTURE</span> REPLICATE<span style="color: #000000;">&#40;</span><span style="color: #ff0000;">"!"</span>,<span style="color: #000000;">30</span><span style="color: #000000;">&#41;</span><br /><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">GET</span> DDATE &nbsp;<span style="color: #0000ff;">ID</span> <span style="color: #000000;">201</span> <span style="color: #0000ff;">OF</span> oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">2</span><span style="color: #000000;">&#93;</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> ODLG <span style="color: #0000ff;">CENTERED</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">// RESOURCE SCRIPT generated by "Pelles C for Windows, version 6.00".</span><br /><br /><span style="color: #00D7D7;">#include</span> <windows.h><br /><span style="color: #00D7D7;">#include</span> <commctrl.h><br /><span style="color: #00D7D7;">#include</span> <richedit.h><br /><br />LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US<br /><br />TESTFLD <span style="color: #0000ff;">DIALOG</span> DISCARDABLE <span style="color: #000000;">4</span>, <span style="color: #000000;">12</span>, <span style="color: #000000;">493</span>, <span style="color: #000000;">359</span><br /><span style="color: #0000ff;">STYLE</span> WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_SYSMENU|WS_VISIBLE<br />CAPTION <span style="color: #ff0000;">"this is a test"</span><br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"Tahoma"</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"OK"</span>, IDOK, <span style="color: #ff0000;">"Button"</span>, BS_DEFPUSHBUTTON|WS_TABSTOP, <span style="color: #000000;">1</span>, <span style="color: #000000;">336</span>, <span style="color: #000000;">35</span>, <span style="color: #000000;">21</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"Annuler"</span>, IDCANCEL, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">456</span>, <span style="color: #000000;">336</span>, <span style="color: #000000;">35</span>, <span style="color: #000000;">21</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">201</span>, <span style="color: #ff0000;">"SysTabControl32"</span>, TCS_MULTISELECT|WS_TABSTOP, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">488</span>, <span style="color: #000000;">329</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">301</span>, <span style="color: #ff0000;">"Button"</span>, WS_TABSTOP, <span style="color: #000000;">234</span>, <span style="color: #000000;">336</span>, <span style="color: #000000;">25</span>, <span style="color: #000000;">23</span><br /><span style="color: #000000;">&#125;</span><br /><br />TESTA1 <span style="color: #0000ff;">DIALOG</span> DISCARDABLE <span style="color: #000000;">3</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">393</span>, <span style="color: #000000;">293</span><br /><span style="color: #0000ff;">STYLE</span> WS_CHILD|DS_ABSALIGN|DS_3DLOOK|WS_CAPTION<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">10</span>, <span style="color: #ff0000;">"Tahoma"</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">201</span>, <span style="color: #ff0000;">"Edit"</span>, WS_BORDER|WS_TABSTOP, <span style="color: #000000;">50</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">91</span>, <span style="color: #000000;">11</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">202</span>, <span style="color: #ff0000;">"Edit"</span>, WS_BORDER|WS_TABSTOP, <span style="color: #000000;">202</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">91</span>, <span style="color: #000000;">11</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"First Name"</span>, <span style="color: #000000;">401</span>, <span style="color: #ff0000;">"Static"</span>, SS_CENTER|WS_BORDER|WS_GROUP, <span style="color: #000000;">3</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">11</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"Last Name"</span>, <span style="color: #000000;">402</span>, <span style="color: #ff0000;">"Static"</span>, SS_CENTER|WS_BORDER|WS_GROUP, <span style="color: #000000;">148</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">45</span>, <span style="color: #000000;">11</span><br /><span style="color: #000000;">&#125;</span><br /><br />TESTA2 <span style="color: #0000ff;">DIALOG</span> DISCARDABLE <span style="color: #000000;">4</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">481</span>, <span style="color: #000000;">286</span><br /><span style="color: #0000ff;">STYLE</span> WS_CHILD|DS_ABSALIGN|WS_CAPTION<br /><span style="color: #0000ff;">FONT</span> <span style="color: #000000;">10</span>, <span style="color: #ff0000;">"Tahoma"</span><br /><span style="color: #000000;">&#123;</span><br />&nbsp; CONTROL <span style="color: #ff0000;">""</span>, <span style="color: #000000;">201</span>, <span style="color: #ff0000;">"Edit"</span>, WS_BORDER|WS_TABSTOP, <span style="color: #000000;">80</span>, <span style="color: #000000;">8</span>, <span style="color: #000000;">46</span>, <span style="color: #000000;">11</span><br />&nbsp; CONTROL <span style="color: #ff0000;">"Highlight me please with the mouse"</span>, <span style="color: #000000;">402</span>, <span style="color: #ff0000;">"Static"</span>, SS_CENTER|WS_BORDER|WS_GROUP, <span style="color: #000000;">0</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">73</span>, <span style="color: #000000;">24</span><br /><span style="color: #000000;">&#125;</span><br /><br /><br /><br /><br />&nbsp;</div>[/code:j5rhuayc]
resource workshop windows seven
Richard, Just remove the WS_CAPTION style from the child dialogs: STYLE WS_CHILD|DS_ABSALIGN|DS_3DLOOK // | WS_CAPTION with that change here it works fine <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
resource workshop windows seven
Antonio Thank you, it works now Pelles C is adding the caption to the child dialogs by default ... Thanks for the help, Richard
resource workshop windows seven
Richard, Yes, that was the problem <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> Good to know is fine now
resources or commands
Which is better programming and faster using : External resources or xbase commands? Which is usable ,better and faster using DLL or RC? Thanks in advance .
resources or commands
They are different techniques for different situations. There is nothing like "one is better than the other". You have to use the one that better fits your needs. EMG
resources or commands
For me the fastest way are resources in RC files then linked into the EXE. I've been working this way for years.... no complain.