topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
xBrowse in cell of other xbrowse | [quote="FranciscoA":1o7a34c9]Rick, thanks for your reply.
Maybe I don't explained correctly ( my bad english).
What I want to do is to use cells of xbrowse1 and insert other xBrowses into xBrowse1's each cells..
Is't possible?[/quote:1o7a34c9]
Not impossible, but requires lot of work.
Instead, it is easier to create two browses like master-child. |
xBrowse incremental search | Hi all,
i have customers xBrowse with dbfntx on upper( name ).
I would like to search by typing a customer name without using the shift key.
Unfortunatelly it doesn't seek.
here my code:
[code=fw:2ujnwi4g]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> oBrwLf := XbrowseNew<span style="color: #000000;">(</span> oDlg, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>,,,,;<br /> <span style="color: #000000;">{</span> || oSysTitle:<span style="color: #000000;">SetText</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">" POs at "</span> + lf->name1 <span style="color: #000000;">)</span> <span style="color: #000000;">}</span>,,,,, <span style="color: #000000;">0</span>, CLR_4,, .f., <span style="color: #ff0000;">"lf"</span>,, .f.,, .t., <span style="color: #000000;">80</span>, .t., .f. ,,,,, .f., .f., .f., .t. <span style="color: #000000;">)</span><br /> <br /> oBrwLf:<span style="color: #000000;">AddColumn</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"LfNr."</span>, <span style="color: #000000;">{</span> || lf->lfnr <span style="color: #000000;">}</span>,,,, <span style="color: #ff0000;">"LEFT"</span>, <span style="color: #000000;">45</span>, .F., .F.,,,,,, .F., <span style="color: #ff0000;">"lfnr"</span>,,,, .F.,,, <span style="color: #000000;">)</span><br /> oBrwLf:<span style="color: #000000;">AddColumn</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Name"</span> , <span style="color: #000000;">{</span> || lf->name1 + CRLF + lf->name2 <span style="color: #000000;">}</span>,,,, <span style="color: #ff0000;">"LEFT"</span>, <span style="color: #000000;">200</span>, .F., .F.,,,,,, .F., <span style="color: #ff0000;">"lfname"</span>,,,, .F.,,, <span style="color: #000000;">)</span><br /> <br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oBrwLf:<span style="color: #000000;">oSeek</span> <span style="color: #0000ff;">PROMPT</span> oBrwLf:<span style="color: #000000;">cSeek</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">81</span> <span style="color: #0000ff;">OF</span> oDlg<br /><br /> WITH OBJECT oBrwLf<br /> :<span style="color: #000000;">bSeek</span> := <span style="color: #000000;">{</span> |c| lf-><span style="color: #000000;">(</span> DbSeek<span style="color: #000000;">(</span> upper<span style="color: #000000;">(</span> c <span style="color: #000000;">)</span>, .t. <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, !lf-><span style="color: #000000;">(</span> eof<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">nDataLines</span> := <span style="color: #000000;">2</span><br /> END<br /> </div>[/code:2ujnwi4g]
If i type a letter the browse doesn't move and the letter is not diplayed in the seek say.
But when i use the shift key to type capital letters, the browse moves correctly and the letter is displayed in the seek say.
Could anybody give me a tip what' s wrong with that?
Thanks and regards,
Detlef |
xBrowse incremental search | Hello Detlef,
I use this some years already and it works fine for me ( maybe a bit old fashion ).
If the browser has the focus, the input is displayed in the say and starts the incremental-seek.
Inside the function, You have absolute control what You want to do, the user presses a special key.
[code=fw:12e6yc24]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #B900B9;">// Input-Control</span><br /><span style="color: #B900B9;">// -----------------</span><br /><span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">SAY</span> oSEEK <span style="color: #0000ff;">VAR</span> cSEEK <span style="color: #0000ff;">ID</span> <span style="color: #000000;">100</span> <span style="color: #0000ff;">OF</span> oDlg COLORS CLR_WHITE, CLR_BLUE <span style="color: #0000ff;">UPDATE</span><br /><br />oLbx:<span style="color: #000000;">bKeyChar</span> := <span style="color: #000000;">{</span>| nKey | oldpos := ORDKEYNO<span style="color: #000000;">(</span><span style="color: #000000;">)</span>, RE_SUCH<span style="color: #000000;">(</span>nKey,oSEEK,oLbx<span style="color: #000000;">)</span>, ;<br /> oLbx:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oLbx:<span style="color: #000000;">oVScroll</span>:<span style="color: #000000;">SetPos</span><span style="color: #000000;">(</span>ORDKEYNO<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">FUNCTION</span> RE_SUCH<span style="color: #000000;">(</span>nKey,oSEEK,oLbx<span style="color: #000000;">)</span> <br /><br /><span style="color: #00C800;">IF</span> nKey > <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">IF</span> nKey <> <span style="color: #000000;">13</span><br /> xlen := len<span style="color: #000000;">(</span>cSEEK<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> nKey = <span style="color: #000000;">27</span><br /> cSEEK := <span style="color: #ff0000;">""</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">IF</span> nKey = <span style="color: #000000;">8</span> .and. cSEEK <> <span style="color: #ff0000;">""</span> <span style="color: #B900B9;">// right Mouse-click emptys the seek-field (Init)</span><br /> cSEEK := <span style="color: #0000ff;">substr</span><span style="color: #000000;">(</span>cSEEK,<span style="color: #000000;">1</span>,xlen<span style="color: #000000;">-1</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> old_Index = <span style="color: #000000;">4</span> <span style="color: #B900B9;">// a special Index is used </span><br /> <span style="color: #B900B9;">// DESCEND(str(jahrgang) + rechng_nr + Upper(archiv_nr))" } ) // 34</span><br /> DBSEEK<span style="color: #000000;">(</span>DESCEND<span style="color: #000000;">(</span>cSEEK<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> DBSEEK<span style="color: #000000;">(</span>cSEEK<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">IF</span> !Found<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> MsgAlert<span style="color: #000000;">(</span><span style="color: #ff0000;">"Not Found !"</span>, <span style="color: #ff0000;">"Attention"</span><span style="color: #000000;">)</span><br /> cSEEK := <span style="color: #ff0000;">""</span><br /> DBGOTOP<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ELSE</span><br /> cSEEK := cSEEK+ AnsiToOem<span style="color: #000000;">(</span>CHR<span style="color: #000000;">(</span>nKey<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> old_Index = <span style="color: #000000;">4</span><br /> <span style="color: #B900B9;">// DESCEND(str(jahrgang) + rechng_nr + Upper(archiv_nr))" } ) // 34</span><br /> DBSEEK<span style="color: #000000;">(</span>DESCEND<span style="color: #000000;">(</span>cSEEK<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> DBSEEK<span style="color: #000000;">(</span>cSEEK<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">IF</span> !Found<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> MsgAlert<span style="color: #000000;">(</span><span style="color: #ff0000;">"Not Found !"</span>, <span style="color: #ff0000;">"Attention"</span><span style="color: #000000;">)</span><br /> cSEEK := <span style="color: #ff0000;">""</span><br /> DBGOTOP<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">IF</span> cSEEK = <span style="color: #ff0000;">""</span><br /> DBGOTO<span style="color: #000000;">(</span>oldpos<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /> oLbx:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br />ENDIFf<br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br /> </div>[/code:12e6yc24]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
xBrowse incremental search | Uwe,
thanks for your suggest.
A code like yours would be my workaround.
But my intention was to avoid such additional coding for we have a bSeek block of the xBrowse class.
Unfortunately it doesn't seem to work as expected. <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
Thanks and regards,
Detlef |
xBrowse incremental search | Hello Detlef,
maybe a solution with a codeblock is possible, lets wait.
Just something I remember to include inside the function.
A help during the seek :
The SAY ( seeking a name ) : Hoefn[color=#FF0000:3i6174qr]?[/color:3i6174qr]
If the user presses a [color=#FF0000:3i6174qr]?[/color:3i6174qr] You can include :
IF nKey = 63
Msgalert( "This is a message.....", "Attention" )
// delete the [color=#FF0000:3i6174qr]?[/color:3i6174qr] after closing the message
// ---------------------------------------------
cSEEK := substr(cSEEK,1,xlen-1)
ENDIF
Or allow only 0 - 1 and A - X ( nKey = 48 - 57 and 65 - 90 )
I see, that You are using NTX with UPPER
If You want to change from [color=#FF0000:3i6174qr]NTX[/color:3i6174qr] to [color=#FF0000:3i6174qr]CDX [/color:3i6174qr]( maybe planed for the future ),
UPPER on Index-key doesn't work because of < ÖÜÄß > You have to change to LOWER.
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
xBrowse incremental search | Simple oBrw:bSeek := { |c| (oBrw:cAlias)->( DbSeek( Upper( c ) ) ) } should work and works for me ( for character columns if index is on Upper(...) and browse has focus )
Please make sure the Browse has focus ( normally better we set focus on int clause ) and the proper index is selected. Please note SoftSeek need not be used.
One friendly advice:
Please read the comments included in the method AddColumn( ... )
[quote:t168b1u8] // This method is intended only to support command syntax
// and this method should not be called directly in the
// application program
[/quote:t168b1u8]
This method is mean to support the command syntax of 'ADD TO oBrw'. If we insist on using OOPS syntax, but not the command syntax, we better go by the original way of oCol := oBrw:AddCol() and then set each data individually. From the above notes there is no guarantee that in future versions the method will retain compatibility with the present version. |
xBrowse incremental search | >
May be my error with bSeek could result from using xBrowse and TsBrowse libs in the same program?
>
I don't think so. XBrowse will use its own methods for bSeek
In any case, it may be a good idea to keep sbrowse and xbrowses in different program modules. Not desirable to have both browses in the same program file. Not even TCBrowse and TXBrowse.
I wish I can reproduce your problem at my end. When I am trying it is working |
xBrowse incremental search | [quote="nageswaragunupudi":2y4e13cn]Simple oBrw:bSeek := { |c| (oBrw:cAlias)->( DbSeek( Upper( c ) ) ) } should work and works for me ( for character columns if index is on Upper(...) and browse has focus )
Please make sure the Browse has focus ( normally better we set focus on int clause ) and the proper index is selected. Please note SoftSeek need not be used.
One friendly advice:
Please read the comments included in the method AddColumn( ... )
// This method is intended only to support command syntax
// and this method should not be called directly in the
// application program
This method is mean to support the command syntax of 'ADD TO oBrw'. If we insist on using OOPS syntax, but not the command syntax, we better go by the original way of oCol := oBrw:AddCol() and then set each data individually. From the above notes there is no guarantee that in future versions the method will retain compatibility with the present version.[/quote:2y4e13cn]
Rao,
many thanks for your advices.
As i already wrote, the index is on Upper( field->name ) and the Browse does seek it and move correctly.
But only if i type capital letters using the shift key.
When i read your fiendly advice i got an idea.
I didn't use the xbase syntax because the program uses lots of Manuels TsBrowse objects. So i had to include "tsbrowse.ch" which doesn't correctly translate the xBrowse commands.
May be my error with bSeek could result from using xBrowse and TsBrowse libs in the same program?
I'll try to find out this.
Thanks and regards, Rao,
Detlef |
xBrowse incremental search | Hi, I have this:
oBrw:lSeekBar := .T.
oBrw:lIncrFilter := .F.
oBrw:lAutoSort := .T.
oBrw:lSeekWild := .T.
If I Set lincrFilter := .T. lSeekBar dont apear even I set lSeekBar .T.
lseekBar and lIncrFilter works together?
Thanks! |
xBrowse incremental seek multiple indexes | Mr. Rao,
DBF is used
the settings :
[code=fw:1b4ft56k]<div class="fw" id="{CB}" style="font-family: monospace;"><br />WITH OBJECT oBrw1<br /> :<span style="color: #000000;">lIncrFilter</span> := .t.<br /> :<span style="color: #000000;">lSeekWild</span> := .t. <br /> :<span style="color: #000000;">bChange</span> := <span style="color: #000000;">{</span> || K_GET<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <br /> :<span style="color: #000000;">nFreeze</span> := <span style="color: #000000;">2</span><br />END<br /> </div>[/code:1b4ft56k]
best regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
xBrowse incremental seek multiple indexes | Hello,
I tested xBrowse incremental seek with multiple indexes
Only the 1. selected column is used.
Changing the column, the seek still belongs to the first selection.
Clicking on the header, the index works
I''m using :
[color=#0000FF:2wsvy4sp][b:2wsvy4sp]REDEFINE SAY oBrw1:oSeek PROMPT oBrw1:cSeek ID 300 OF oFld:aDialogs[ 1 ] PIXEL FONT oFontSmall
oBrw1:oSeek:Setcolor( 0, 16777215 )[/b:2wsvy4sp][/color:2wsvy4sp]
1. column selected
[img:2wsvy4sp]http://www.pflegeplus.com/IMAGES/Incr1.jpg[/img:2wsvy4sp]
4. column selected searching for < P >, but searching in column 1
field < Typ > is sorted
[img:2wsvy4sp]http://www.pflegeplus.com/IMAGES/Incr2.jpg[/img:2wsvy4sp]
best regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: --> |
xBrowse incremental seek multiple indexes | Please tell us more:
What setting are you using for:
1. lIncrFilter .t. or .f.
2 lSeekWild .t. or .f.
Are you using DBF |
xBrowse incremental seek multiple indexes | Unlike incremental seek, incremental filter works slightly differently.
The filter actually works on oBrw:cFilterFld, which can be specified by the programmer. The filter expression is not cleared (unlike incremental seek) when sort order is changed and the user can continue to type the filter expression. He can also view the filtered records in different sort orders. Actually filter has nothing to do with sort order and does not require index.
When programmer does not specify oBrw:cFilterFld, xbrowse assigns the sorted field when the first search key is pressed.
During runtime, programmer can change the filter field depending on his design. |
xBrowse info. | Guys:
Where I can find all the data & methods that xBrowse supports ? It seems that the manual does not show all options. FiveWin 10.06 |
xBrowse info. | Please have a look into the class:
FWH/source/classes/xbrowse.prg
Best regards,
Otto |
xBrowse info. | In addition, please see
1. FiveWiki
2. Whatsnew.txt in the FWH folder. This provides information on latest changes that are not included in the FiveWiki
3. Sample programs in \fwh\samples\ folder. In particular testxbr3.prg covers many different aspects of xbrowse programming. |
xBrowse info. | Thank you very much Rao. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
xBrowse intermittent ""message not found: NIL:NLASTKEY error | I'm using FWH11.08. Intermittently the error below will appear. Where do I start looking to prevent this kind of error occuring?
[img:icpdjx1r]http://s32.postimg.org/lrf5rzyg5/journal.jpg[/img:icpdjx1r]
TIA
--
hua |
xBrowse intermittent ""message not found: NIL:NLASTKEY error | May I know
Did you sent oCol:lAutoSave to .T. ?
What is the data type of that column? |
xBrowse intermittent ""message not found: NIL:NLASTKEY error | Yes oCol:lAutoSave = .T.
I think the column's data type is character |
xBrowse intermittent ""message not found: NIL:NLASTKEY error | 1) Suggest leave oCol:lAutoSave as default .F.
2) Since you say this is an intermittent error, it can take a lot of time for us to figure out why and when this error could arise.
We'll try and if you can help us under what situation the error is coming that would be halpful |
xBrowse intermittent ""message not found: NIL:NLASTKEY error | >>1) Suggest leave oCol:lAutoSave as default .F.
[i:26049ny1]If left as .f., then user can't immediately key-in? What's the alternative method?[/i:26049ny1]
>>2) Since you say this is an intermittent error, it can take a lot of time for us to figure out why and when this error could arise.
>>We'll try and if you can help us under what situation the error is coming that would be halpful
I understand. When I looked at the source I don't understand how the error could have happened because before it reach oEditGet:nLastkey it already passed oCol:oEditGet != nil
It's a long time bug that I couldn't duplicate how it occur |
xBrowse intermittent ""message not found: NIL:NLASTKEY error | [quote:kqhqfts3]>>1) Suggest leave oCol:lAutoSave as default .F.
If left as .f., then user can't immediately key-in? What's the alternative method?
[/quote:kqhqfts3]
No
If lFastEdit is true, then the user can enter the get by pressing any key.
In fact lAutoSave is not very safe.
When lAutoSave is false ( default ), any value entered is saved only when the user expressly presses a key to terminate the Get. That is the user knows he intends to save the value.
If for some reason browse loses focus, the value is not saved.
When lAutoSave is .t., if for any reason browse loses focus, the partly entered value is saved without the user's express intention to save.
So, the default is safe. But as you know xBrowse provides for different tastes of different programmers.
[quote:kqhqfts3]I understand. When I looked at the source I don't understand how the error could have happened because before it reach oEditGet:nLastkey it already passed oCol:oEditGet != nil
It's a long time bug that I couldn't duplicate how it occur
[/quote:kqhqfts3]
Yes. You are right.
Same reason I am unable to quickly decide how to catch the situation |
xBrowse jpg in SQL-database | Hi,
I want to browse data and bitmaps stored in an SQL-database with ADO.
Browsing the data comming from the database is no problem, also browsing a bitmap depending of the database is no problem.
Is the an example I can use?
Thanks, |
xBrowse jpg in SQL-database | Marc
I presume you are trying to view jpg thumbnails imported into a Sql table. From my experience, the only way to store any file in a Sql table is to import the picture as a binary file (AppendChunk) into a ( sql server ) VarBinary(Max) or equivalent.
The data is stored as bytes and have to be re-assembled back in it original form ( GetChunk )to be viewed... so I don't know if it is feasable to do all of that within an xBrowse table.
Like you mentioned .. you can test to see if the BarBinary(Max) field isnil() or not then based on that you can have xBrowse show a generic picture icon.
Rick Lipkin |
xBrowse jpg in SQL-database | Rick,
Indeed,I want to show jpg-files imported in a SQL-table in a browse.
I want to store it with "'0x"+STRTOHEX() into a MEDIUMBLOB field, and extracting it before showing it, but I don't know how to show it... |
xBrowse jpg in SQL-database | We advise 4 simple ways of inserting images into Ado table. Following program works for any database.
[code=fw:1bntu3q9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"fivewin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"adodef.ch"</span> <span style="color: #B900B9;">// important</span><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oCn, cTableName, aJpg<br /><br /> oCn := <......... Ado connection object. Connect in your own way ..><br /> cTableName := <span style="color: #ff0000;">"MyImages"</span> <span style="color: #B900B9;">// any other name you like</span><br /> aJpg := <span style="color: #000000;">{</span> array <span style="color: #0000ff;">of</span> jpg files wih path <span style="color: #000000;">}</span><br /><br /> AdoImportImages<span style="color: #000000;">(</span> oCn, <span style="color: #ff0000;">"MyImages"</span>, aJpg <span style="color: #000000;">)</span><br /><br /> oCn:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> AdoImportImages<span style="color: #000000;">(</span> oCn, cTable, aJpg <span style="color: #000000;">)</span><br /><br /> CreateTable<span style="color: #000000;">(</span> oCn, cTable <span style="color: #000000;">)</span><br /> UsingSQL<span style="color: #000000;">(</span> oCn, cTable, cFileNoPath<span style="color: #000000;">(</span> aJpg<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, MemoRead<span style="color: #000000;">(</span> aJpg<span style="color: #000000;">[</span> <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> UsingAdoRecordSet<span style="color: #000000;">(</span> oCn, cTable, cFileNoPath<span style="color: #000000;">(</span> aJpg<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, MemoRead<span style="color: #000000;">(</span> aJpg<span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> UsingTDataRow<span style="color: #000000;">(</span> oCn, cTable, cFileNoPath<span style="color: #000000;">(</span> aJpg<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span>, MemoRead<span style="color: #000000;">(</span> aJpg<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /> BrowseImagesTable<span style="color: #000000;">(</span> oCn, cTable <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> CreateTable<span style="color: #000000;">(</span> oCn, cTable <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">TRY</span><br /> oCn:<span style="color: #000000;">Execute</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"DROP TABLE "</span> + cTable <span style="color: #000000;">)</span><br /> CATCH<br /> END<br /><br /> FWAdoCreateTable<span style="color: #000000;">(</span> cTable, <span style="color: #000000;">{</span> ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"IMAGENAME"</span>, <span style="color: #ff0000;">'C'</span>, <span style="color: #000000;">20</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"IMAGEDATA"</span>, <span style="color: #ff0000;">'m'</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span>, oCn <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">/*<br />Notes: Use this function to create tables. Thie same syntax and notiation are compatible with different databases.<br />Data Type small 'm' indicates binary data in contast to "M" meaning text memo.<br />*/</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> UsingSQL<span style="color: #000000;">(</span> oCn, cTable, cImageName, cImageData <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> cSql<br /><br /> <span style="color: #00C800;">PRIVATE</span> table_name := cTable<br /><br /> cSql := SQL INSERT INTO &table_name <span style="color: #000000;">(</span> IMAGENAME,IMAGEDATA <span style="color: #000000;">)</span> VALUES <span style="color: #000000;">(</span> cImageName, cImageData <span style="color: #000000;">)</span><br /> oCn:<span style="color: #000000;">Execute</span><span style="color: #000000;">(</span> cSql <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// This works for ADO and non ado connections</span><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> UsingAdoRecordSet<span style="color: #000000;">(</span> oCn, cTable, cImageName, cImageData <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oRs<br /><br /> oRs := FW_OpenRecordSet<span style="color: #000000;">(</span> oCn, cTable <span style="color: #000000;">)</span><br /> oRs:<span style="color: #000000;">AddNew</span><span style="color: #000000;">(</span> <span style="color: #000000;">{</span> <span style="color: #ff0000;">"ImageName"</span>, <span style="color: #ff0000;">"ImageData"</span> <span style="color: #000000;">}</span>, <span style="color: #000000;">{</span> cImageName, STRTOHEX<span style="color: #000000;">(</span> cImagedata <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> oRs:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> UsingTDataRow<span style="color: #000000;">(</span> oCn, cTable, cImageName, cImageData <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oRs, oRec<br /><br /> oRs := FW_OpenRecordSet<span style="color: #000000;">(</span> oCn, cTable <span style="color: #000000;">)</span><br /> oRec := TDataRow<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> oRs, .t. <span style="color: #000000;">)</span><br /> oRec:<span style="color: #000000;">ImageName</span> := cImageName<br /> oRec:<span style="color: #000000;">ImageData</span> := cImageData<br /> oRec:<span style="color: #000000;">Save</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oRs:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> BrowseImagesTable<span style="color: #000000;">(</span> oCn, cTable <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oRs := FW_OpenRecordSet<span style="color: #000000;">(</span> oCn, cTable <span style="color: #000000;">)</span><br /><br /> XBROWSER oRs FASTEDIT SETUP <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">ImageData</span>:<span style="color: #000000;">nDataBmpAlign</span> := AL_CENTER, oBrw:<span style="color: #000000;">lCanPaste</span> := .t. <span style="color: #000000;">)</span><br /><br /> oRs:<span style="color: #000000;">Close</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:1bntu3q9]
3 methods are shown in the 3 Useby functions in the above program. Now the 4th method.
Copy any image from Web or any other imaging program or document into clipboard. Move to any Image cell in the xbrowse. Press Ctrl-V. The image is pasted into the cell and also is written in the database table.
[url=https://imageshack.com/i/hlDYrpvBj:1bntu3q9][img:1bntu3q9]http://imagizer.imageshack.us/v2/xq90/633/DYrpvB.jpg[/img:1bntu3q9][/url:1bntu3q9]
This program is tested with MSSQL (SQLEXPRESS) and with MYSQL before posting.
[url=https://imageshack.com/i/hlDYrpvBj:1bntu3q9][img:1bntu3q9]http://imagizer.imageshack.us/v2/xq90/633/DYrpvB.jpg[/img:1bntu3q9][/url:1bntu3q9]
Specific note for MySql: By default the maximum size of packet size for communication between client and server is only 1 MB and this is not adequate for images. You need to increase this size sutabluy once. Please see
// <!-- m --><a class="postlink" href="https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html">https://dev.mysql.com/doc/refman/5.5/en ... large.html</a><!-- m --> |
xBrowse jpg in SQL-database | Thank you for the 4 examples.
I will try them and let you know the results. |
xBrowse jpg in SQL-database | Hi,
I have use
[code=fw:2n5r5g29]<div class="fw" id="{CB}" style="font-family: monospace;">oSQL:<span style="color: #000000;">execute</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"INSERT INTO 'boeken' ( nummer,cover) VALUES ( 1,"</span>+STRTOHEX<span style="color: #000000;">(</span>memoread<span style="color: #000000;">(</span><span style="color: #ff0000;">"C:<span style="color: #000000;">\C</span>OVERS<span style="color: #000000;">\1</span>.jpg"</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">" )"</span><span style="color: #000000;">)</span></div>[/code:2n5r5g29]
to inport the jpg-files into the database.
In my xbrowse I use
[code=fw:2n5r5g29]<div class="fw" id="{CB}" style="font-family: monospace;">oBrw:<span style="color: #000000;">bline</span> = <span style="color: #000000;">{</span>|| <span style="color: #000000;">{</span> str<span style="color: #000000;">(</span>oRs:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">'nummer'</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><span style="color: #000000;">)</span>,oRs:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">'cover'</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> <span style="color: #000000;">}</span><span style="color: #000000;">}</span></div>[/code:2n5r5g29]
but the column that should show the bitmap is empty.
Should I use something special to show bitmap? |
xBrowse jpg in SQL-database | 1) Please use the syntax as I provided. That is safe.
2) bLine is not for xbrowse. It is for wbrowse.
For xbrose just use:
@ r,c XBROWSE oBrw DATASOURCE oRs COLUMNS "nummer", "naam", "cover" .............. |
xBrowse jpg in SQL-database | What should I use for bLine for wbrowse?
I also have some wbrowse in an existing program I want to modify. |
xBrowse jpg in SQL-database | It is xbrowse which is provided with display of images.
I advise you to use xbrowse for this purpose |
xBrowse jpg in SQL-database | Thank you, I will use xbrowse
[quote="nageswaragunupudi":1qoe2f69]It is xbrowse which is provided with display of images.
I advise you to use xbrowse for this purpose[/quote:1qoe2f69] |
xBrowse jpg in SQL-database | [quote:2o9moz7k]I have use
Code:
oSQL:execute( "INSERT INTO 'boeken' ( nummer,cover) VALUES ( 1,"+STRTOHEX(memoread("C:\COVERS\1.jpg"))+" )")
to inport the jpg-files into the database.
[/quote:2o9moz7k]
This may not work. Also you need to write this statement differently for different databases.
As we recommend, please use this syntax:
[code=fw:2o9moz7k]<div class="fw" id="{CB}" style="font-family: monospace;">cSql := SQL INSERT INTO boeken <span style="color: #000000;">(</span> nummer, cover <span style="color: #000000;">)</span> VALUES <span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, memoread<span style="color: #000000;">(</span> <span style="color: #ff0000;">"c:<span style="color: #000000;">\c</span>overs<span style="color: #000000;">\1</span>.jpg"</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br />oCn:<span style="color: #000000;">Execute</span><span style="color: #000000;">(</span> cSql <span style="color: #000000;">)</span><br /> </div>[/code:2o9moz7k]
This works with all databases |
xBrowse jpg in SQL-database | Hi Rao,
I am getting the following error while trying to save images to MS SQL table. What am I doing wrong?
ERROR: Incorrect syntax near '+'. (0x80040E14)
Code:
cSqlIns := [INSERT INTO asset_chart(]
cSqlIns += [itemnumber,]
cSqlIns += [inspcft]
cSqlIns += [)]
cSqlIns += [ VALUES (]
cSqlIns += ['] + _SqlClean( cItem ) + [',]
cSqlIns += MemoRead( cCft + aImages[nX1,1] )
cSqlIns += [)]
TRY
oSql:Open( cSqlIns, xCONNECT )
nAdded++
CATCH oError
IF MsgNoYes( "Unable to Perform Table Update, Process Aborted." + cEol + oError:Description + cEol + cSqlIns + cEol + xCONNECT, Ptitle )
MemoWrit( 'sql-err.txt', oError:Description )
EXIT
ENDIF
END |
xBrowse jpg in SQL-database | Rao,
Here is the complete code in case you need it:
TRY
oSql:=TOleAuto():New("ADODB.Recordset")
CATCH
MsgWait( "Unable to Load SQL Driver" )
RETURN (.F.)
END
// Set...
oSql:CursorType := 1 // opendkeyset
oSql:CursorLocation := 3 // local cache
oSql:LockType := 3 // lock opportunistic
// Init
xCONNECT := 'Provider='+xPROVIDER+';Data Source='+xSOURCE+';Initial Catalog='+xDATABASE+';User Id='+xUSERID+';Password='+xPASSWORD
aImages := Directory( cCft + "*.*" )
FOR nX1=1 TO LEN(aImages)
cTemp := aImages[nX1,1]
cItem := ""
oSay:SetText( LTRIM( STR( ROUND( (nX1/LEN(aImages))*100, 2), 9, 3) ) + "% Complete . . ." )
Sysrefresh()
FOR nX2:=1 TO LEN(cTemp)
cChar := SUBSTR(cTemp,nX2,1)
IF (cChar=="-") .OR. (cChar=='.')
EXIT
ENDIF
cItem += cChar
NEXT nX2
IF ! EMPTY(cItem)
//cSqlIns := [INSERT asset SET inspcft=(SELECT * FROM OPENROWSET(BULK N'] + cCft + cTemp + [',SINGLE_BLOB) AS CertificateImage),inspcfttype='JPG' WHERE itemnumber='] + ALLTRIM(cItem) + [']
cSqlIns := [INSERT INTO asset_chart(]
cSqlIns += [itemnumber,]
cSqlIns += [inspcft]
cSqlIns += [)]
cSqlIns += [ VALUES (]
cSqlIns += ['] + _SqlClean( cItem ) + [',]
cSqlIns += MemoRead( cCft + aImages[nX1,1] )
cSqlIns += [)]
TRY
oSql:Open( cSqlIns, xCONNECT )
nAdded++
CATCH oError
IF MsgNoYes( "Unable to Perform Table Update, Process Aborted." + cEol + oError:Description + cEol + cSqlIns + cEol + xCONNECT, Ptitle )
MemoWrit( 'sql-err.txt', oError:Description )
EXIT
ENDIF
END
ENDIF
NEXT nX1
oSql:=nil |
xBrowse jpg in SQL-database | Rao,
I changed the following code and it seems to be working.
cSqlIns += STRTOHEX( MemoRead( cCft + aImages[nX1,1] ) )
I will let you know once process is complete |
xBrowse jpg in SQL-database | Hi Rao,
It did not work. Any ideas what needs to be done? |
xBrowse jpg in SQL-database | [code=fw:31jlx6u4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #ff0000;">"0x"</span> + STRTOHEX<span style="color: #000000;">(</span> MEMOREAD<span style="color: #000000;">(</span> ... <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> </div>[/code:31jlx6u4] |
xBrowse jpg in SQL-database | Still, we advise you to adopt the approach and syntax advised by us in our samples above. They are safe and work with any database. You will not be wasting your time in searching for solutions like this. |
xBrowse jpg in SQL-database | Thanks Rao, that seemed to solve the problem. If I run in to any issues, I will contact you. |
xBrowse jpg in SQL-database | Hi,
Is it the same with DOCX or XLSX or PDF ?
What is the instruction to read the file saved in a sql table and display it with WORD or Excel or PDF Viewer ?
Should we read from the blob field, save it to the disk with MEMOWRITE or FWRITE and the open the files ?
Thanks for your help .
Philippe . |
xBrowse jpg in SQL-database | We need to first write them to a temporary file on the disk and then open the file with appropriate application.
Writing to disk:
[code=fw:1z0be6a4]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// xharbour</span><br />MEMOWRIT<span style="color: #000000;">(</span> cFilename, oRs:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"fieldname"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span>, .f. <span style="color: #000000;">)</span> <span style="color: #B900B9;">// ADO</span><br /><span style="color: #B900B9;">//or</span><br />MEMOWRIT<span style="color: #000000;">(</span> cFileName, oRs:<span style="color: #000000;">fieldname</span>, .f. <span style="color: #000000;">)</span> <span style="color: #B900B9;">// FWMARIADB library</span><br /><br /><span style="color: #B900B9;">// or both harbour and xharbour</span><br />HB_MEMOWRIT<span style="color: #000000;">(</span> cFileName, oRs:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"fieldname"</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// ADO</span><br /><span style="color: #B900B9;">// OR</span><br />HB_MEMOWRIT<span style="color: #000000;">(</span> cFileName, oRs:<span style="color: #000000;">FieldName</span> <span style="color: #000000;">)</span><br /> </div>[/code:1z0be6a4] |
xBrowse lVScroll .F. Francisco SOLUCIONADO | Estimados amigos no he conseguido que no aparezcan las barras de
desplazamiento vertical y horizontal, no las quiero.
oBrSaldo:lHScroll := .F. no me funciona
oBrSaldo:lVScroll := .F. no me funciona
He leido que hay que declararlo el recurso...pero como se hace si el style de recurso es..
Con PellesC
Window Style 0x50310000
Extended window style 0x00000000
Alguien sabe que valores van para que no muestre los barra scroll?
Muchas gracias
Saludos
Ruben Fernandez |
xBrowse lVScroll .F. Francisco SOLUCIONADO | Saludos, coloca en windows style 0x10210000, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
xBrowse lVScroll .F. Francisco SOLUCIONADO | joseluisysturiz,
Como dice Ruferso se requiere de que via codigo en los recursos se pueda o no eliminar el scroll, y tambien comentar que antes con el mouse movias la barra del scroll y movia igual los registros, ahora no. |
xBrowse lVScroll .F. Francisco SOLUCIONADO | Hola, en la ver. 1204 me funciona asi:
Con PellesC
Window Style 0x50010000
oBrSaldo:lHScroll := .F.
oBrSaldo:lVScroll := .F. |
xBrowse lVScroll .F. Francisco SOLUCIONADO | [quote="wmormar":20pmvj3b]joseluisysturiz,
Como dice Ruferso se requiere de que via codigo en los recursos se pueda o no eliminar el scroll, y tambien comentar que antes con el mouse movias la barra del scroll y movia igual los registros, ahora no.[/quote:20pmvj3b]
Saludos Willian, respondi basado en su pregunta de como debe ir windows style si se usa pelles c, asi lo tengo y no da las barras y como dice francisco da las barras, saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
xBrowse lVScroll .F. Francisco SOLUCIONADO | Hola, gracias a todos por las sugerencias.
(La respuesta viene tarde porque recién llegue del trabajo)
Lo que necesitaba era que colocar en el Window Style del TxBrowse en un recurso editado con PellesC para poder
desde código decidir si quiero o no las barras de scroll.(vertical y horizontal)
La sugerencia de JoseLuis me quitó la barra horizontal, aunque la vertical me sigue apareciendo.
La sugerencia de Francisco, que es como lo tengo, no me quita las barras de scroll, por mas que desde código
ponga oBrw:lVScroll := .F. y oBrw:lHScroll := .F. .
Gracias, por ahora esta bien, ya que la barra horizontal se quito. Igualmente me gustaría saber que estilo va
para poner o no las barras desde código. Ya se verá.
Muchas gracias a todos.
Saludos
Ruben Fernandez |
xBrowse lVScroll .F. Francisco SOLUCIONADO | Hola
[url:z9gheabf]http://msdn.microsoft.com/en-us/library/windows/desktop/bb787601(v=vs.85).aspx[/url:z9gheabf]
Un saludo
#pragma BEGINDUMP
#include "windows.h"
#include "hbapi.h"
HB_FUNC( SHOWSCROLLBAR )
{
hb_retl( ShowScrollBar( (HWND) hb_parnl( 1 ), hb_parni( 2 ), hb_parl( 3 ) ) );
}
#pragma ENDDUMP |
xBrowse lVScroll .F. Francisco SOLUCIONADO | Ruferso, francamente no se que problema puedas tener, pero como te dije, incluso en la ver 1006 me funciona asi:
Con PellesC
[b:1cyacjtd][size=150:1cyacjtd]Window Style 0x50010000[/size:1cyacjtd] ( tú tienes puesto 0x50310000 )
[/b:1cyacjtd]
Si omites lo siguiente, apararecen las barras:
oBrSaldo:lHScroll := .F.
oBrSaldo:lVScroll := .F.
//--------------
oLbx := TXBrowse():New( oDlg )
oLbx:cAlias:="MCONTAB"
//ESTILOS DE LINEAS
oLbx:nMarqueeStyle := MARQSTYLE_HIGHLROW //normal
oLbx:nColDividerStyle := LINESTYLE_DARKGRAY //LINESTYLE_INSET
oLbx:nRowDividerStyle := LINESTYLE_DARKGRAY //LINESTYLE_INSET
oLbx:lColDividerComplete := .t. //completa pintado hasta el footer cuando lineas no llenan todo el browse
oLbx:nStretchCol := STRETCHCOL_LAST //llenar espacio con ultima columna
oLbx:lTransparent := .t.
oLbx:lContrastClr := .f. //para que no cambie color de texto automaticamente segun intensidad del fondo
//HEADERS Y FOOTERS
oLbx:nHeaderHeight := 30 //Altura cabeceras de col
oLbx:lRecordSelector := .t. //poner o no, COL de la flechita de la izq
oLbx:lAllowRowSizing := .f. // If true horizontal row sizing is allowed
oLbx:lAllowColSwapping := .f. // If true col swapping is allowed
//COLORES (texto y fondo del texto)
oLbx:bClrHeader := {|| { nRGB(140, 0, 0), nRGB( 231, 242, 255 ), } }
oLbx:bClrFooter := oLbx:bClrHeader
oLbx:bClrStd := {|| { nRGB( 0, 0, 0), nRGB(255,248,220) } } // colores para lineas normales
oLbx:bClrSel := {|| { nRGB( 0, 0, 0), aGradRowSel } } // para barra de linea selecc cuando el control no tiene el foco
oLbx:bClrSelFocus := { || { CLR_BLACK, aGradBarSel } } // para barra de linea selecc cuando el control tiene el foco
oLbx:nRowHeight := 20 //altura entre lineas
oLbx:lHScroll := .F.
oLbx:lVScroll := .F.
//COLUMNAS DEL BROWSE
oCol = oLbx:AddCol()
oCol:bStrData = { || Mcontab->cuenta }
oCol:cHeader = "CtaM"
oCol:nWidth = 30
oCol = oLbx:AddCol()
oCol:bStrData = { || Mcontab->Nombre }
oCol:nDataStrAlign := 3
oCol:cHeader = "Nombre de la Cuenta"
oCol:nWidth = 300
oLbx:CreateFromResource(181)
oLbx:SetRDD()
oLbx:lKinetic := .f.
oLbx:SetBackGround(".\BrowBack.bmp" ) |
xBrowse lVScroll .F. Francisco SOLUCIONADO | Francisco: SI, SI, SI. Estas en lo cierto.
Mil disculpas, esta funcionando.
Muchisimas gracias, y disculpa mi torpeza. A veces me pasa. Serán los años?
Saludos
Ruben Fernandez |
xBrowse lVScroll .F. Francisco SOLUCIONADO | Ruferso, no hay de que. Estamos para ayudarnos. A mi me ha pasado en varias ocasiones.
Saludos. |
xBrowse look Office 2019 - Office 365 | Hello,
Is it posible?. Thank you very much and merry xmas!. |
xBrowse look Office 2019 - Office 365 | As of now, xbrowse supports 2007,2010,2013,2015 styles.
[code=fw:12eno05l]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oBrw:<span style="color: #000000;">SetStyle</span><span style="color: #000000;">(</span> nStyle <span style="color: #000000;">)</span><br /> </div>[/code:12eno05l] |
xBrowse look Office 2019 - Office 365 | Thank you.
Any plans to implement it?.
What about Office 2016 style in Ribbon?. |
xBrowse look Office 2019 - Office 365 | I am using Office 360.
This is how Excel sheet looks.
[url=https://imageshack.com/i/pnegv5ccp:2w18nyso][img:2w18nyso]https://imagizer.imageshack.com/v2/xq90/923/egv5cc.png[/img:2w18nyso][/url:2w18nyso]
Adopting the same style, this is how xbrowse looks:
[url=https://imageshack.com/i/plbuAwh3p:2w18nyso][img:2w18nyso]https://imagizer.imageshack.com/v2/xq90/921/buAwh3.png[/img:2w18nyso][/url:2w18nyso]
Do you call it 2016 style? If not what style we can call this?
If 2016 style is different, can you post a screen shot of Excel 2016 style? |
xBrowse look Office 2019 - Office 365 | Nages,
If you do a search for "Excel 2016" and then select "images" you will get a lot of screenshots of the Excel app. I suspect this is the style he is referring to. I found the same issue when working with the ribbonbar-it didn't look like the Microsoft apps. However, in this case the only difference I see is the color of the highlighted color title is gray in the Excel app and green in the Excel 365 version. Hmm, now I see in the Excel app, the current cell outline is also green.
I also note that the Excel app has a green ribbonbar, but that is a separate issue. |
xBrowse look Office 2019 - Office 365 | Mr. James
Thanks. But I could not find the highlight color in any of the images. The gray color is not the highlight color but column/row indicator color.
We are about to enter 2019. Isn't 2016 too old now? Why can we not adopt the color scheme of Office 360 as 2018 style? |
xBrowse look Office 2019 - Office 365 | Nages,
>But I could not find the highlight color in any of the images.
Unless you enlarge them, they are hard to see since the highlight color is a dark green.
>The gray color is not the highlight color but column/row indicator color.
Sorry, I said "highlighted color title" but I meant to say "highlighted column color."
[url=https://postimages.org/:23o0oq0e][img:23o0oq0e]https://i.postimg.cc/yYJLRjXD/Excel2016.png[/img:23o0oq0e][/url:23o0oq0e]
So the highlighted column color is dark gray and the highlight cell color is dark green (matching the ribbonbar). At some point Microsoft introduced color themes and they default to a different color for each app (Word, Excel, Powerpoint, etc.).
>We are about to enter 2019. Isn't 2016 too old now?
I agree that maybe going back to 2016 isn't a good idea at this date. However, the color theme is going to continue to be an issue every year or two, so it would be wise to make an interface that we could use to easily change the colors. I don't know about xBrowse but in the ribbonbar class it is impossible to change some of the colors without either modifing the class source or subclassing. In the ribbonbar a lot of the colors are set with codeblocks containing RGB() values which can't be changed from outside the class.
>Why can we not adopt the color scheme of Office 360 as 2018 style?
Personally, I would prefer to use the 2018 style so we can match the xbrowses with the Ribbonbar color themes. I suspect also that users may see the separate Office apps as a higher end product. Maybe others on this forum would like to express their opinions...
James |
xBrowse look Office 2019 - Office 365 | Yes, sorry there was a typo. I was refering to Office 2019 - Office 365 style.
Thank you. |
xBrowse look Office 2019 - Office 365 | [quote="MOISES":3cgj70ag]Yes, sorry there was a typo. I was refering to Office 2019 - Office 365 style.
Thank you.[/quote:3cgj70ag]
Then we provided 2018 style in FWH 18.12 for XBrowse
oBrw:SetStyle( 2018 ) |
xBrowse look Office 2019 - Office 365 | Thanks. Can you please upload a .exe example?.
What about Ribbon?.
Thank you. |
xBrowse look Office 2019 - Office 365 | The appearance is what I posted above.
Changes to Ribbon will take time. |
xBrowse look Office 2019 - Office 365 | Thank you very much for your attention and quick response.
I want to express the importance and urgency of the graphic changes. Users don't appreciate a compiler change or the FW_RecToJson function, but they do appreciate a graphic look change. As we all are aware, one of the first ways to sell a software is by eye-catching.
I would like to conclude, once again, by expressing my gratitude for the excellent efforts of the entire Fivetech team. |
xBrowse look Office 2019 - Office 365 | [quote="nageswaragunupudi":3dlgdr8o][quote="MOISES":3dlgdr8o]Yes, sorry there was a typo. I was refering to Office 2019 - Office 365 style.
Thank you.[/quote:3dlgdr8o]
Then we provided 2018 style in FWH 18.12 for XBrowse
oBrw:SetStyle( 2018 )[/quote:3dlgdr8o]
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=36604">viewtopic.php?f=3&t=36604</a><!-- l --> |
xBrowse me agrega una columna adicional no definida | Estimados colegas
Tengo un xbrowse que defino yo creo correctamente, pero no entiendo porque razón me agrega una columna vacía al final, lo que ya identifique es que se da cuando agrego bitmaps en el texto de las cabeceras (en columnas 1 y 10 usando :AddBitmap y :HeadBmpNo), pero no encuentra la razón para ello.
Mi código es el siguiente (uso FWH1709):
[code=fw:f01ks2oj]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">LOCAL</span> aGraficos:=<span style="color: #000000;">{</span><span style="color: #ff0000;">"PRACTICA"</span> ,<span style="color: #ff0000;">"EQUIPO-IDEAL"</span><span style="color: #000000;">}</span><br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFnt <span style="color: #0000ff;">NAME</span> GetSysFont<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-11</span><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFnt2 <span style="color: #0000ff;">NAME</span> GetSysFont<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-11</span> BOLD<br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlgEst <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"DATOS_HIST5"</span> <span style="color: #0000ff;">OF</span> oVent <span style="color: #0000ff;">FONT</span> oFnt <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Estadísticas individuales de cada Equipo"</span><br /> <span style="color: #0000ff;">REDEFINE</span> COLUMN <span style="color: #0000ff;">XBROWSE</span> oLbx <span style="color: #0000ff;">ID</span> <span style="color: #000000;">6001</span> <span style="color: #0000ff;">OF</span> oDlgEst ARRAY aEstad AUTOSORT GDI<br /> ADD COLUMN <span style="color: #0000ff;">TO</span> oLbx <span style="color: #00C800;">AT</span> <span style="color: #000000;">1</span> ARRAY ELEMENT <span style="color: #000000;">1</span> HEADER <span style="color: #ff0000;">"Equipos"</span> WIDTH <span style="color: #000000;">110</span> ALIGN <span style="color: #0000ff;">LEFT</span><br /> ADD COLUMN <span style="color: #0000ff;">TO</span> oLbx <span style="color: #00C800;">AT</span> <span style="color: #000000;">2</span> ARRAY ELEMENT <span style="color: #000000;">2</span> HEADER <span style="color: #ff0000;">"P.J."</span> WIDTH <span style="color: #000000;">35</span> ALIGN <span style="color: #0000ff;">RIGHT</span><br /> ADD COLUMN <span style="color: #0000ff;">TO</span> oLbx <span style="color: #00C800;">AT</span> <span style="color: #000000;">3</span> ARRAY ELEMENT <span style="color: #000000;">3</span> HEADER <span style="color: #ff0000;">"Jugadores inscritos"</span> WIDTH <span style="color: #000000;">72</span> ALIGN <span style="color: #0000ff;">RIGHT</span><br /> ADD COLUMN <span style="color: #0000ff;">TO</span> oLbx <span style="color: #00C800;">AT</span> <span style="color: #000000;">4</span> ARRAY ELEMENT <span style="color: #000000;">4</span> HEADER <span style="color: #ff0000;">"Jugadores utilizados"</span> WIDTH <span style="color: #000000;">74</span> ALIGN <span style="color: #0000ff;">RIGHT</span><br /> ADD COLUMN <span style="color: #0000ff;">TO</span> oLbx <span style="color: #00C800;">AT</span> <span style="color: #000000;">5</span> ARRAY ELEMENT <span style="color: #000000;">5</span> HEADER <span style="color: #ff0000;">"Jugadores que marcaron gol"</span> WIDTH <span style="color: #000000;">97</span> ALIGN <span style="color: #0000ff;">RIGHT</span><br /> ADD COLUMN <span style="color: #0000ff;">TO</span> oLbx <span style="color: #00C800;">AT</span> <span style="color: #000000;">6</span> ARRAY ELEMENT <span style="color: #000000;">6</span> HEADER <span style="color: #ff0000;">"Alineaciones utilizadas"</span> WIDTH <span style="color: #000000;">86</span> ALIGN <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">COLOR</span> CLR_GREEN, <span style="color: #00C800;">NIL</span><br /> ADD COLUMN <span style="color: #0000ff;">TO</span> oLbx <span style="color: #00C800;">AT</span> <span style="color: #000000;">7</span> ARRAY ELEMENT <span style="color: #000000;">7</span> HEADER <span style="color: #ff0000;">"Jugadores actuando en 80% de PJ"</span> WIDTH <span style="color: #000000;">86</span> ALIGN <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">COLOR</span> CLR_BLUE, <span style="color: #00C800;">NIL</span><br /> ADD COLUMN <span style="color: #0000ff;">TO</span> oLbx <span style="color: #00C800;">AT</span> <span style="color: #000000;">8</span> ARRAY ELEMENT <span style="color: #000000;">8</span> HEADER <span style="color: #ff0000;">"Jugadores actuando en 60% de PJ"</span> WIDTH <span style="color: #000000;">87</span> ALIGN <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">COLOR</span> CLR_BLUE, <span style="color: #00C800;">NIL</span><br /> ADD COLUMN <span style="color: #0000ff;">TO</span> oLbx <span style="color: #00C800;">AT</span> <span style="color: #000000;">9</span> ARRAY ELEMENT <span style="color: #000000;">9</span> HEADER <span style="color: #ff0000;">"Promedio de Edad de las Alineaciones"</span> WIDTH <span style="color: #000000;">90</span> ALIGN <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">COLOR</span> CLR_BLUE, <span style="color: #00C800;">NIL</span><br /> ADD COLUMN <span style="color: #0000ff;">TO</span> oLbx <span style="color: #00C800;">AT</span> <span style="color: #000000;">10</span> ARRAY ELEMENT <span style="color: #000000;">10</span> HEADER <span style="color: #ff0000;">"Detalle de las Alineaciones"</span> WIDTH <span style="color: #000000;">120</span> ALIGN <span style="color: #0000ff;">RIGHT</span> <span style="color: #0000ff;">COLOR</span> CLR_BLUE, <span style="color: #00C800;">NIL</span><br /> oLbx:<span style="color: #000000;">l2007</span> := .T.<br /> oLbx:<span style="color: #000000;">nColDividerStyle</span> := LINESTYLE_INSET<br /> oLbx:<span style="color: #000000;">nRowDividerStyle</span> := LINESTYLE_INSET<br /> oLbx:<span style="color: #000000;">nRowHeight</span> := <span style="color: #000000;">21.69</span> <span style="color: #B900B9;">// Altura entre lineas</span><br /> oLbx:<span style="color: #000000;">nHeaderLines</span> := <span style="color: #000000;">3</span><br /> oLbx:<span style="color: #000000;">nMarqueeStyle</span> := MARQSTYLE_HIGHLCELL <span style="color: #B900B9;">// solo ilumina la celda actual</span><br /> oLbx:<span style="color: #000000;">lRecordSelector</span> := .T. <span style="color: #B900B9;">// poner o no, columna de la flechita de la izquierda</span><br /> oLbx:<span style="color: #000000;">bClrStd</span> :=<span style="color: #000000;">{</span> || <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span>oLbx:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>%<span style="color: #000000;">2</span>==<span style="color: #000000;">0</span>, <span style="color: #000000;">{</span>CLR_BLUE,CLR_LGREEN<span style="color: #000000;">}</span>, <span style="color: #000000;">{</span>CLR_BLUE,CLR_LGRAY<span style="color: #000000;">}</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #B900B9;">// colores para todas las lineas</span><br /> oLbx:<span style="color: #000000;">lFooter</span> := .T. <span style="color: #B900B9;">// Que si/no tendrá footer</span><br /> oLbx:<span style="color: #000000;">nFooterLines</span> := <span style="color: #000000;">1</span> <span style="color: #B900B9;">// Lineas del footer</span><br /> oLbx:<span style="color: #000000;">nFooterHeight</span> := <span style="color: #000000;">20</span> <span style="color: #B900B9;">// Altura del footer</span><br /> oLbx:<span style="color: #000000;">nFreeze</span> := <span style="color: #000000;">2</span><br /> WITH OBJECT oLbx:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">nFooterType</span> := AGGR_COUNT <span style="color: #B900B9;">// Conteo</span><br /> :<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Nombres de Equipos"</span><br /> :<span style="color: #000000;">AddBitmap</span><span style="color: #000000;">(</span>aGraficos, <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">nHeadBmpNo</span> := <span style="color: #000000;">1</span><br /> END<br /> WITH OBJECT oLbx:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span><span style="color: #000000;">2</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Partidos Jugados por cada Equipo"</span><br /> :<span style="color: #000000;">oDataFont</span> := <span style="color: #000000;">{</span>|| oFnt2 <span style="color: #000000;">}</span><br /> END<br /> WITH OBJECT oLbx:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span><span style="color: #000000;">3</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Número de Jugadores inscritos"</span><br /> END<br /> WITH OBJECT oLbx:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span><span style="color: #000000;">4</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Número de Jugadores utilizados"</span><br /> END<br /> WITH OBJECT oLbx:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span><span style="color: #000000;">5</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Número de Jugadores que marcaron gol"</span><br /> END<br /> WITH OBJECT oLbx:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span><span style="color: #000000;">6</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Número de Alineaciones utilizadas"</span><br /> :<span style="color: #000000;">oDataFont</span> := <span style="color: #000000;">{</span>|| oFnt2 <span style="color: #000000;">}</span><br /> END<br /> WITH OBJECT oLbx:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span><span style="color: #000000;">7</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Número de jugadores presentes en el 80% de partidos"</span><br /> END<br /> WITH OBJECT oLbx:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span><span style="color: #000000;">8</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">cTooltip</span> := <span style="color: #ff0000;">"Número de jugadores presentes en el 60% de partidos"</span><br /> END<br /> WITH OBJECT oLbx:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span><span style="color: #000000;">9</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">nFooterType</span> := AGGR_MAX <span style="color: #B900B9;">// Máximo</span><br /> :<span style="color: #000000;">nFootStrAlign</span> := AL_CENTER <span style="color: #B900B9;">// Alinea el texto del footer</span><br /> :<span style="color: #000000;">SetProgBar</span><span style="color: #000000;">(</span><span style="color: #000000;">36</span>, <span style="color: #000000;">84</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">cTooltip</span> := <span style="color: #000000;">{</span><span style="color: #ff0000;">"Promedio de Edad con los 11 iniciales de cada Equipo"</span>, <span style="color: #ff0000;">"SicefWin "</span>+cVersSW, <span style="color: #000000;">1</span>, CLR_WHITE, CLR_CYAN<span style="color: #000000;">}</span><br /> END<br /> WITH OBJECT oLbx:<span style="color: #000000;">oCol</span><span style="color: #000000;">(</span><span style="color: #000000;">10</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER <span style="color: #B900B9;">// alinea el texto de la cabecera al centro</span><br /> :<span style="color: #000000;">bLClickHeader</span> := <span style="color: #000000;">{</span>|| oLbx:<span style="color: #000000;">Gotop</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">}</span><br /> :<span style="color: #000000;">bStrData</span> := <span style="color: #000000;">{</span> || <span style="color: #ff0000;">"<Alineaciones ...>"</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">nEditType</span> := EDIT_BUTTON<br /> :<span style="color: #000000;">bEditBlock</span> := <span style="color: #000000;">{</span> | r,c,o | EditarMemo<span style="color: #000000;">(</span>r,c,o,aEstad<span style="color: #000000;">[</span>oLbx:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,<span style="color: #000000;">10</span><span style="color: #000000;">]</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">cTooltip</span> := <span style="color: #000000;">{</span><span style="color: #ff0000;">"Detalle de todas las Alineaciones usadas"</span>, <span style="color: #ff0000;">"SicefWin "</span>+cVersSW, <span style="color: #000000;">1</span>, CLR_WHITE, CLR_CYAN<span style="color: #000000;">}</span><br /> :<span style="color: #000000;">AddBitmap</span><span style="color: #000000;">(</span>aGraficos, <span style="color: #000000;">)</span><br /> :<span style="color: #000000;">nHeadBmpNo</span> := <span style="color: #000000;">2</span><br /> END<br /> <span style="color: #00C800;">FOR</span> i=<span style="color: #000000;">9</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">1</span> STEP <span style="color: #000000;">-1</span><br /> oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span>i<span style="color: #000000;">]</span>:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER <span style="color: #B900B9;">// alinea el texto de la cabecera al centro</span><br /> oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span>i<span style="color: #000000;">]</span>:<span style="color: #000000;">bLClickHeader</span> := <span style="color: #000000;">{</span>|| oLbx:<span style="color: #000000;">Gotop</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">}</span><br /> oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span>i<span style="color: #000000;">]</span>:<span style="color: #000000;">cOrder</span> := <span style="color: #ff0000;">"D"</span><br /> oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span>i<span style="color: #000000;">]</span>:<span style="color: #000000;">cSortOrder</span> := i<br /> oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span>i<span style="color: #000000;">]</span>:<span style="color: #000000;">SortArrayData</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span>i><span style="color: #000000;">2</span> .AND. i<<span style="color: #000000;">9</span>, oLbx:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span>i<span style="color: #000000;">]</span>:<span style="color: #000000;">nTotal</span>:=<span style="color: #000000;">0</span>, <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">NEXT</span><br /> oCol1:=oLbx:<span style="color: #000000;">InsCol</span><span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span> <span style="color: #B900B9;">// inserta columna</span><br /> oCol1:<span style="color: #000000;">bStrData</span> := <span style="color: #000000;">{</span> || AllTrim<span style="color: #000000;">(</span>Str<span style="color: #000000;">(</span>oLbx:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,<span style="color: #000000;">5</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> oCol1:<span style="color: #000000;">nDataStrAlign</span> := <span style="color: #000000;">1</span><br /> oCol1:<span style="color: #000000;">nHeadStrAlign</span> := AL_CENTER<br /> oCol1:<span style="color: #000000;">bClrStd</span> := <span style="color: #000000;">{</span> || <span style="color: #000000;">{</span> CLR_HRED, <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span>oLbx:<span style="color: #000000;">KeyNo</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>%<span style="color: #000000;">2</span>==<span style="color: #000000;">0</span>, CLR_LGREEN, CLR_LGRAY<span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> oCol1:<span style="color: #000000;">cHeader</span> := <span style="color: #ff0000;">"Nº."</span><br /> oCol1:<span style="color: #000000;">nWidth</span> := <span style="color: #000000;">24</span><br /> oCol1:<span style="color: #000000;">cTooltip</span> := <span style="color: #000000;">{</span><span style="color: #ff0000;">"Número"</span>, <span style="color: #ff0000;">"SicefWin "</span>+cVersSW, <span style="color: #000000;">1</span>, CLR_WHITE, CLR_CYAN<span style="color: #000000;">}</span><br /> oCol1:<span style="color: #000000;">bLClickHeader</span> := <span style="color: #000000;">{</span>|| oLbx:<span style="color: #000000;">Gotop</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">}</span><br /> oLbx:<span style="color: #000000;">Gotop</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>n <span style="color: #0000ff;">ID</span> <span style="color: #000000;">1</span> <span style="color: #0000ff;">OF</span> oDlgEst <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Sale de esta pantalla"</span> <span style="color: #0000ff;">ACTION</span> oDlgEst:<span style="color: #000000;">END</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBtn<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span>=<span style="color: #ff0000;">"Sale de esta pantalla"</span><br /> <span style="color: #0000ff;">REDEFINE</span> <span style="color: #0000ff;">BTNBMP</span> oBtn<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span> <span style="color: #0000ff;">ID</span> <span style="color: #000000;">6011</span> <span style="color: #0000ff;">OF</span> oDlgEst <span style="color: #0000ff;">RESOURCE</span> <span style="color: #ff0000;">"EXCEL16"</span> <span style="color: #000000;">2007</span> <span style="color: #0000ff;">MESSAGE</span> <span style="color: #ff0000;">"Exporta datos a formato Excel"</span> ;<br /> <span style="color: #0000ff;">ACTION</span> oLbx:<span style="color: #000000;">ToExcel</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBtn<span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">cToolTip</span>=<span style="color: #ff0000;">"Exporta datos a formato Excel"</span><br /> oDlgEst:<span style="color: #000000;">bKeyDown</span>:=<span style="color: #000000;">{</span> |nKey,nFlags| <span style="color: #00C800;">IF</span><span style="color: #000000;">(</span> nKey==VK_ESCAPE, oDlgEst:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #B900B9;">// Sale de oDlg al aplastar Escape</span><br /> oDlgEst:<span style="color: #000000;">oFont</span> := TFont<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"ARIAL"</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">-11</span>, .F., .T.<span style="color: #000000;">)</span><br /> oDlgEst:<span style="color: #000000;">lHelpIcon</span>:= .F.<br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlgEst <span style="color: #0000ff;">CENTERED</span> RESIZE16 <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span>oDlgEst:<span style="color: #000000;">SetIcon</span><span style="color: #000000;">(</span>oApp:<span style="color: #000000;">cIcono</span><span style="color: #000000;">)</span>, oLbx:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> </div>[/code:f01ks2oj]
Saludos
Fernando Espinoza A. |
xBrowse me agrega una columna adicional no definida | Estimados;
Algún aporte sobre este tema.
Saludos
Fernando Espinoza A. |
xBrowse me agrega una columna adicional no definida | [quote="nanoespinoza":mmau40ap]Estimados;
Algún aporte sobre este tema.
Saludos
Fernando Espinoza A.[/quote:mmau40ap]
Cuantas columnas deberias de tener y muestra una imagen del xbrowse, ademas de como defines la VAR oLbx del xbrowse...saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: --> |
xBrowse me agrega una columna adicional no definida | Debería tener 11 columnas, como verá en mi código, pero me aparece una columna 12 en vacío, como verá en el gráfico:
LOCAL oLbx
<!-- m --><a class="postlink" href="https://ibb.co/mMt2GK">https://ibb.co/mMt2GK</a><!-- m -->
Saludos |
xBrowse me agrega una columna adicional no definida | In this line
[code=fw:3u5l6au0]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">REDEFINE</span> COLUMN <span style="color: #0000ff;">XBROWSE</span> oLbxID <span style="color: #000000;">6001</span> <span style="color: #0000ff;">OF</span> oDlgEst ARRAY aStat AUTOSORT GDI <br /> </div>[/code:3u5l6au0]
please remove "GDI" at the end. |
xBrowse me agrega una columna adicional no definida | OK, se resolvió el problema.
Me gustaría conocer a que se debe.
Saludos |
xBrowse method not working | I tried gotop() method as below but not cause the browse to go top :
[code:2pnlypej]
DEFINE DIALOG oDlg of oWnd FROM 0,0 TO 45,128 TITLE "Meter reads browse "
oBrw := TXBrowse():New( oDlg )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.
oBrw:nHeaderLines := 1
oBrw:nFooterLines := 1
oBrw:nDataLines := 1
oBrw:lFooter := .t.
oBrw:SetRDD()
oBrw:CreateFromCode()
oBrw:nTop = 0
oBrw:nLeft = 0
oBrw:nWidth = 1000
oBrw:nHeight =600
oBrw:GoTop()
for nFor := 1 to Fcount()
*oBrw:aCols[ nFor ]:cFooter := alltrim(STR(TOTALEM2(V_me_mc_serl),12,0))
if nFor=27
oBrw:aCols[ nFor ]:cHeader := FieldName( nFor )
oBrw:aCols[ nFor ]:cFooter := alltrim(STR(TOTALEM2(),12,0))
loop
endif
*oBrw:aCols[ nFor ]:cHeader := FieldName( nFor )
*oBrw:aCols[ nFor ]:cFooter := FieldName( nFor )
next
oBrw:Refresh(.t.) // Repaint the ListBox
ACTIVATE DIALOG oDlg ON INIT (oBrw:SetSize( 1000, 600 ),BuildButtons( oDlg ),oDlg:Refresh(.t.),oBrw:Refresh(.t.))
[/code:2pnlypej] |
xBrowse method not working | Ehab,
Try call go top on 'on init' clause of activate dialog, like:
[code:3gd1530b]
ACTIVATE DIALOG oDlg ON INIT (oBrw:SetSize( 1000, 600 ),BuildButtons( oDlg ),oDlg:Refresh(.t.), oBrw:GoTop(),; // <-- HERE
oBrw:Refresh(.t.))
[/code:3gd1530b]
Regards,
Maurilio |
xBrowse method not working | I already tried - not working -
[code:3p1u9zkt]
STATIC FUNCTION listmete( oWnd )
*--------------------------
local oDlg, oCol
local nTotal:=0
local oBrw
local nfor,cFilter:="",bFilter:=""
local y
local V_me_mc_serl:= space(7)
REQUEST ADS
rddRegister( "ADS", 1 )
rddsetdefault( "ADS" )
AdsSetDeleted(.T.)
SET SERVER LOCAL
SET FILETYPE TO CDX
/*
select 1
USE cust
INDEX ON upper(cust->cu_acct) TO cust
INDEX ON upper(cust->cu_name) TO cust1
INDEX ON upper(cust->cu_coun) TO cust2
INDEX ON upper(cust->cu_city) TO cust3
INDEX ON upper(cust->cu_gove) TO cust4
INDEX ON upper(cust->cu_stre) TO cust5
INDEX ON upper(cust->cu_phon) TO cust6
INDEX ON upper(cust->cu_fax ) TO cust7
INDEX ON upper(cust->cu_mobi) TO cust8
INDEX ON upper(cust->cu_man ) TO cust9
INDEX ON upper(cust->cu_appr) TO cust10
set INDEX TO cust
select 2
USE cont
INDEX ON cont->CT_CU_ACCT+dtoc(cont->ct_strd) TO cont
INDEX ON cont->CT_CU_acct TO cont1
INDEX ON cont->ct_strd TO cont2
INDEX ON cont->ct_endd TO cont3
INDEX ON cont->CT_machno TO cont4
INDEX ON cont->CT_mamc TO cont5
INDEX ON cont->ct_paymet TO cont6
INDEX ON cont->ct_payamt TO cont7
INDEX ON cont->ct_currenc TO cont8
INDEX ON cont->ct_excmet TO cont9
INDEX ON cont->ct_excamt TO cont10
INDEX ON cont->ct_minvol TO cont11
INDEX ON cont->ct_ctna TO cont12
SET INDEX TO cont1
select 3
use mach
index on mach->MC_CU_ACCT to mach
index on UPPER(mach->MC_CU_name) to mach1
index on UPPER(mach->MC_ct_ctna) to mach2
index on UPPER(mach->MC_model) to mach3
index on UPPER(mach->MC_TYPE)+UPPER(mach->MC_model) to mach4
index on (mach->MC_serial) to mach5
index on UPPER(mach->MC_meres) to mach6
index on UPPER(mach->MC_brn) to mach7
index on UPPER(mach->MC_gateway) to mach8
set index to mach5
go top*/
select 4
use mete
index on mete->ME_mc_serl to mete
index on str(mete->year) + str(mete->month) to mete1
index on mete->me_date to mete2
set index to mete
if MsgGet( "Serial Machine", "Enter Serial Machine", @V_me_mc_serl,;
"..\lupa.bmp" )
select 3
use mach
set index to mach5
*MSGINFO(IndexKey())
if ! DbSeek( (V_me_mc_serl ))
MsgAlert( "I don't find that serial" )
endif
endif
y := "'"+padr(V_me_mc_serl,7)+"'"
cFilter := "me_mc_serl = "+ y
bFilter = "{||"+cFilter+"}"
select 4
use mete
DBSETFILTER(&bFilter,cFilter)
mete->(DBGOTOP())
DEFINE DIALOG oDlg of oWnd FROM 0,0 TO 45,128 TITLE "Meter reads browse "
oBrw := TXBrowse():New( oDlg )
oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oBrw:nColDividerStyle := LINESTYLE_BLACK
oBrw:nRowDividerStyle := LINESTYLE_BLACK
oBrw:lColDividerComplete := .t.
oBrw:nHeaderLines := 1
oBrw:nFooterLines := 1
oBrw:nDataLines := 1
oBrw:lFooter := .t.
oBrw:SetRDD()
oBrw:CreateFromCode()
oBrw:nTop = 0
oBrw:nLeft = 0
oBrw:nWidth = 1000
oBrw:nHeight =600
for nFor := 1 to Fcount()
*oBrw:aCols[ nFor ]:cFooter := alltrim(STR(TOTALEM2(V_me_mc_serl),12,0))
if nFor=27
oBrw:aCols[ nFor ]:cHeader := FieldName( nFor )
oBrw:aCols[ nFor ]:cFooter := alltrim(STR(TOTALEM2(),12,2))
loop
endif
*oBrw:aCols[ nFor ]:cHeader := FieldName( nFor )
*oBrw:aCols[ nFor ]:cFooter := FieldName( nFor )
next
oBrw:Refresh(.t.) // Repaint the ListBox
ACTIVATE DIALOG oDlg ON INIT (oBrw:SetSize( 1000, 600 ),BuildButtons( oDlg ),oBrw:gotop(),oBrw:Refresh(.t.),oDlg:Refresh(.t.))
RETURN NIL[/code:3p1u9zkt] |
xBrowse metro header | Hello Antonio,
how should header/footer painting changes for Metro be inserted.
I think we need a style like l2010.
Best regards,
Otto
[img:1havqvep]http://www.atzwanger-software.com/fw/xBrwheader2.jpg[/img:1havqvep]
[code=fw:1havqvep]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">METHOD</span> PaintHeader<span style="color: #000000;">(</span> hDC, aCols, nLast, hWhitePen, hGrayPen, hColPen <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TxBrowse<br /><br /> <span style="color: #00C800;">local</span> nRow, nCol, oCol, nHeight, nBrwWidth, aGroup<br /> <span style="color: #00C800;">local</span> aColors<br /> <span style="color: #00C800;">local</span> nFor, nAt<br /> <span style="color: #00C800;">local</span> cGrpHdr, nGrpHt, nGrpFrom := <span style="color: #000000;">0</span><br /><br /> nBrwWidth := ::<span style="color: #000000;">BrwWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> aColors := Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bClrHeader</span> <span style="color: #000000;">)</span><br /><br /> nRow := <span style="color: #000000;">0</span><br /> nHeight := ::<span style="color: #000000;">nHeaderHeight</span> - <span style="color: #000000;">3</span> <span style="color: #B900B9;">// Caution: Do not change -3 in a haste. This adjusts 3 pixels added in Adjust method</span><br /> <br /> DrawHorz<span style="color: #000000;">(</span> hDC, nRow, <span style="color: #000000;">2</span>, nBrwWidth, hWhitePen <span style="color: #000000;">)</span><br /> <br /> nRow++<br /> DrawHorz<span style="color: #000000;">(</span> hDC, nRow, <span style="color: #000000;">2</span>, nBrwWidth, hWhitePen <span style="color: #000000;">)</span><br /> nRow++<br /><br /> <span style="color: #00C800;">for</span> nFor := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> nLast<br /> nCol := aCols<span style="color: #000000;">[</span> nFor <span style="color: #000000;">]</span><br /> oCol := ::<span style="color: #000000;">ColAtPos</span><span style="color: #000000;">(</span> nFor <span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// DrawVert( hDC, nCol - 2, nRow + 1, nRow + nHeight - 2, hGrayPen )</span><br /> <span style="color: #B900B9;">// DrawVert( hDC, nCol - 1, nRow + 1, nRow + nHeight - 2, hWhitePen )</span><br /> oCol:<span style="color: #000000;">PaintHeader</span><span style="color: #000000;">(</span> nRow, nCol, nHeight, .f., hDC <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> oCol:<span style="color: #000000;">cGrpHdr</span> != cGrpHdr<br /> cGrpHdr := oCol:<span style="color: #000000;">cGrpHdr</span><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> oCol:<span style="color: #000000;">cGrpHdr</span> <span style="color: #000000;">)</span><br /> nGrpFrom := <span style="color: #000000;">0</span><br /> aGroup := <span style="color: #00C800;">nil</span><br /> <span style="color: #00C800;">else</span><br /> nGrpFrom := nCol<br /> nGrpHt := oCol:<span style="color: #000000;">nGrpHeight</span><br /> nAt := AScan<span style="color: #000000;">(</span> ::<span style="color: #000000;">aHeaderTop</span>, <span style="color: #000000;">{</span> |a| a<span style="color: #000000;">[</span> <span style="color: #000000;">3</span> <span style="color: #000000;">]</span> == oCol:<span style="color: #000000;">nPos</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> aGroup := <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> nAt > <span style="color: #000000;">0</span>, ::<span style="color: #000000;">aHeaderTop</span><span style="color: #000000;">[</span> nAt <span style="color: #000000;">]</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">if</span> nFor == nLast .or. oCol:<span style="color: #000000;">cGrpHdr</span> != ::<span style="color: #000000;">ColAtPos</span><span style="color: #000000;">(</span> nFor + <span style="color: #000000;">1</span> <span style="color: #000000;">)</span>:<span style="color: #000000;">cGrpHdr</span><br /> <span style="color: #00C800;">if</span> ! Empty<span style="color: #000000;">(</span> cGrpHdr <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">// paint group header</span><br /> oCol:<span style="color: #000000;">PaintHeader</span><span style="color: #000000;">(</span> nRow, nGrpFrom, nHeight, .f., hDC, aCols<span style="color: #000000;">[</span> nFor + <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> - nGrpFrom, ;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> aGroup == <span style="color: #00C800;">nil</span>, <span style="color: #00C800;">nil</span>, aGroup<span style="color: #000000;">[</span> <span style="color: #000000;">6</span> <span style="color: #000000;">]</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> DrawHorz<span style="color: #000000;">(</span> hDC, nRow + nGrpHt, nGrpFrom - <span style="color: #000000;">2</span>, aCols<span style="color: #000000;">[</span> nFor + <span style="color: #000000;">1</span> <span style="color: #000000;">]</span> - <span style="color: #000000;">2</span>, hWhitePen <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">next</span> nFor<br /><br /> nCol := aCols<span style="color: #000000;">[</span> nFor <span style="color: #000000;">]</span><br /> <span style="color: #B900B9;">// DrawVert( hDC, nCol - 2, nRow + 1, nRow + nHeight - 2, hGrayPen )</span><br /> <span style="color: #B900B9;">// DrawVert( hDC, nCol - 1, nRow + 1, nRow + nHeight - 2, hWhitePen )</span><br /> DrawHorz<span style="color: #000000;">(</span> hDC, nRow + nHeight, <span style="color: #000000;">0</span>, nBrwWidth - <span style="color: #000000;">2</span>, hWhitePen <span style="color: #000000;">)</span><br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//------------------------------------------------------------------//</span><br /><br /><br /> </div>[/code:1havqvep] |
xBrowse metro header | Are there any plans to insert these chances?
Best regards,
Otto |
xBrowse metro header | A new flat style for xBrowse is under development that would look similar to the above. This new style applies to headers, footers and recordselector also.
This may not be ready for 12.07 though. |
xBrowse metro header | Dear Mr. Rao,
thank you.
Best regards,
Otto |
xBrowse mod harbour | Hello friends,
For learning, I made a small project with mod harbour and bootstrap table.
I would like to call "xBrowse" in mod harbour as easily as with Fivewin.
Here are the first steps.
Best regards,
Otto
Fivewin
[img:1rj6bnkh]https://mybergland.com/fwforum/modxbrowseclip3.jpg[/img:1rj6bnkh]
mod harbour
[img:1rj6bnkh]https://mybergland.com/fwforum/modxbrowseclip5.jpg[/img:1rj6bnkh]
Build in search
[img:1rj6bnkh]https://mybergland.com/fwforum/modxbrowseclip4.jpg[/img:1rj6bnkh]
toggle
[img:1rj6bnkh]https://mybergland.com/fwforum/modxbrowseclip6.jpg[/img:1rj6bnkh]
[img:1rj6bnkh]https://mybergland.com/fwforum/modxbrowseclip7.jpg[/img:1rj6bnkh]
[img:1rj6bnkh]https://mybergland.com/fwforum/modxbrowseclip9.jpg[/img:1rj6bnkh] |
xBrowse mod harbour | I changed the access to DBF and some options in bs-table.
data-search="true"
data-pagination="true"
data-height="600"
data-page-size="25"
data-toggle="table"
[img:1g0p8cky]https://mybergland.com/fwforum/dbfshowcode.jpg[/img:1g0p8cky]
[img:1g0p8cky]https://mybergland.com/fwforum/dbfshow.jpg[/img:1g0p8cky] |
xBrowse mod harbour | prevent unnecessary re-rendering
change during first rendering to none
[code=fw:3726r4fi]<div class="fw" id="{CB}" style="font-family: monospace;"> <br />cHtml += <span style="color: #ff0000;">'<script>'</span><br />cHtml += <span style="color: #ff0000;">'document.getElementById("table").style.display = "none";'</span><br />cHtml += <span style="color: #ff0000;">'</script>'</span><br /> </div>[/code:3726r4fi]
document.ready change to show rendered table
[code=fw:3726r4fi]<div class="fw" id="{CB}" style="font-family: monospace;"><br />$<span style="color: #000000;">(</span><span style="color: #ff0000;">"document"</span><span style="color: #000000;">)</span>.ready<span style="color: #000000;">(</span><span style="color: #00C800;">function</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">{</span><br />document.getElementById<span style="color: #000000;">(</span><span style="color: #ff0000;">"table"</span><span style="color: #000000;">)</span>.<span style="color: #0000ff;">style</span>.<span style="color: #00C800;">display</span> = <span style="color: #ff0000;">"block"</span>;<br />$<span style="color: #000000;">(</span><span style="color: #ff0000;">'#table'</span><span style="color: #000000;">)</span>.bootstrapTable<span style="color: #000000;">(</span> <span style="color: #ff0000;">'resetView'</span> , <span style="color: #000000;">{</span>height: <span style="color: #000000;">600</span><span style="color: #000000;">}</span> <span style="color: #000000;">)</span>;<br /><span style="color: #000000;">}</span><span style="color: #000000;">)</span>;<br /><br /> </div>[/code:3726r4fi]
[img:3726r4fi]https://mybergland.com/fwforum/stoprerender.gif[/img:3726r4fi] |
xBrowse multi selects (resolvido) | Olá!
Preciso selecionar várias linhas em um xBrowse (uso MySQL).
Vou mostrar uma lista de clientes e o usuário seleciona quais ele deseja.
Alguém indica um exemplo?
Obrigado!
Hello!
I need to select multiple rows in an xBrowse (MySQL usage).
I will show a list of clients and the user selects which ones he wants.
Does anyone indicate an example?
Thank you!
Rodrigo Melo
Belo Horizonte / MG
Brasil |
xBrowse multi selects (resolvido) | Please search for "xbrowse multiselect" in forum
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/search.php?st=0&sk=t&sd=d&keywords=xbrowse+multiselect">search.php?st=0&sk=t&sd=d&keywords=xbrowse+multiselect</a><!-- l -->
Samples:
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=32256&p=189230&hilit=xbrowse+multiselect#p189117">viewtopic.php?f=3&t=32256&p=189230&hilit=xbrowse+multiselect#p189117</a><!-- l -->
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=25049&hilit=xbrowse+multiselect#p136254">viewtopic.php?f=6&t=25049&hilit=xbrowse+multiselect#p136254</a><!-- l --> |
xBrowse multi selects (resolvido) | Navarro,
Gracias. |
xBrowse multi selects (resolvido) | Navarro,
Após selecionar os registros no browse (oBrw) como recuperar os registros selecionados em aPes?
[code=fw:36dec5ql]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> GrupoListarPessoa<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Local</span> oDlg, oBrw, oSay, oPar, oCon, oRet, lRet := .f. <br /> <br /> <span style="color: #00C800;">If</span> ! Conectar<span style="color: #000000;">(</span>.f.<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Return</span><span style="color: #000000;">(</span><span style="color: #00C800;">Nil</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">EndIf</span><br /> oPar := oDba:<span style="color: #000000;">RowSet</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"select id,nom_pes from tb_pes order by nom_pes"</span>,,.t.<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">If</span> oPar == <span style="color: #00C800;">Nil</span><br /> <span style="color: #00C800;">Return</span><span style="color: #000000;">(</span>lRet<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">EndIf</span><br /><br /> <span style="color: #0000ff;">Define</span> <span style="color: #0000ff;">Dialog</span> oDlg <span style="color: #0000ff;">Title</span> <span style="color: #ff0000;">"Selecionar Participantes"</span> <span style="color: #0000ff;">Size</span> <span style="color: #000000;">516</span>,<span style="color: #000000;">358</span> <span style="color: #0000ff;">Of</span> oWnd <span style="color: #0000ff;">Pixel</span><br /><br /> @ <span style="color: #000000;">28</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">xBrowse</span> oBrw <span style="color: #0000ff;">Of</span> oDlg DataSource oPar ;<br /> Columns <span style="color: #ff0000;">'id'</span>,<span style="color: #ff0000;">'nom_pes'</span> ;<br /> Headers <span style="color: #ff0000;">'ID'</span>,<span style="color: #ff0000;">'Pessoa'</span> ;<br /> Pictures <span style="color: #ff0000;">"999"</span>,<span style="color: #ff0000;">"@A"</span> ;<br /> ColSizes <span style="color: #000000;">60</span>,<span style="color: #000000;">400</span> ;<br /> <span style="color: #0000ff;">Font</span> oFnt2 <span style="color: #0000ff;">Size</span> <span style="color: #000000;">255</span>,<span style="color: #000000;">150</span> <span style="color: #0000ff;">Pixel</span> <span style="color: #0000ff;">UpDate</span> Cell AutoSort<br /><br /> oBrw:<span style="color: #000000;">nMarqueeStyle</span> := <span style="color: #000000;">5</span><br /> oBrw:<span style="color: #000000;">nDataType</span> := <span style="color: #000000;">64</span><br /> oBrw:<span style="color: #000000;">nRowDividerStyle</span> := <span style="color: #000000;">3</span><br /> oBrw:<span style="color: #000000;">nColDividerStyle</span> := <span style="color: #000000;">2</span><br /><br /> With Object oBrw:<span style="color: #000000;">InsCol</span><span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span> || AScan<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aSelected</span>, oBrw:<span style="color: #000000;">BookMark</span> <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">SetCheck</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">nHeadBmpNo</span> := <span style="color: #000000;">{</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> Len<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aSelected</span> <span style="color: #000000;">)</span> == oBrw:<span style="color: #000000;">nLen</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> End<br /><br /> oBrw:<span style="color: #000000;">bLClicked</span> := <span style="color: #000000;">{</span> |r,c,f,oBrw| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">MouseColPos</span><span style="color: #000000;">(</span> c <span style="color: #000000;">)</span> == <span style="color: #000000;">1</span> , ;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span> f := AScan<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aSelected</span>, oBrw:<span style="color: #000000;">BookMark</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #000000;">0</span>, ;<br /> AAdd<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aSelected</span>, oBrw:<span style="color: #000000;">BookMark</span> <span style="color: #000000;">)</span>, ;<br /> ADel<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aSelected</span>, f, .t. <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #00C800;">Nil</span> <span style="color: #000000;">)</span>, ;<br /> oBrw:<span style="color: #000000;">RefreshCurrent</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nHeadStrAlign</span> := <span style="color: #000000;">2</span><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nHeadStrAlign</span> := <span style="color: #000000;">2</span><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nHeadStrAlign</span> := <span style="color: #000000;">0</span><br /> oBrw:<span style="color: #000000;">aJustify</span> := <span style="color: #000000;">{</span><span style="color: #000000;">2</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">0</span><span style="color: #000000;">}</span><br /><br /> oBrw:<span style="color: #000000;">bOnRefresh</span> := <span style="color: #000000;">{</span> || oSay:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> @ <span style="color: #000000;">8</span>,<span style="color: #000000;">05</span> <span style="color: #0000ff;">Say</span> <span style="color: #ff0000;">'Selecionados:'</span> <span style="color: #0000ff;">Of</span> oDlg <span style="color: #0000ff;">Pixel</span> <span style="color: #0000ff;">Font</span> oFnt2<br /> @ <span style="color: #000000;">8</span>,<span style="color: #000000;">48</span> <span style="color: #0000ff;">Say</span> oSay <span style="color: #0000ff;">Prompt</span> Len<span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">aSelected</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">Size</span> <span style="color: #000000;">12</span>,<span style="color: #000000;">12</span> <span style="color: #0000ff;">Of</span> oDlg <span style="color: #0000ff;">Pixel</span> <span style="color: #0000ff;">Font</span> oFnt2 <span style="color: #0000ff;">Picture</span> <span style="color: #ff0000;">'99'</span><br /><br /> @ <span style="color: #000000;">6</span>,<span style="color: #000000;">190</span> <span style="color: #0000ff;">BTNBMP</span> oCon <span style="color: #0000ff;">Resource</span> <span style="color: #ff0000;">'sel26'</span> <span style="color: #0000ff;">Of</span> oDlg <span style="color: #0000ff;">Size</span> <span style="color: #000000;">32</span>,<span style="color: #000000;">16</span> <span style="color: #0000ff;">Pixel</span> <span style="color: #000000;">2007</span> ;<br /> <span style="color: #0000ff;">Action</span><span style="color: #000000;">(</span>lRet:=.t.,oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> ToolTip <span style="color: #ff0000;">"Confirmar os selecionados"</span><br /> @ <span style="color: #000000;">6</span>,<span style="color: #000000;">226</span> <span style="color: #0000ff;">BTNBMP</span> oRet <span style="color: #0000ff;">Resource</span> <span style="color: #ff0000;">'sair16'</span> <span style="color: #0000ff;">Of</span> oDlg <span style="color: #0000ff;">Size</span> <span style="color: #000000;">32</span>,<span style="color: #000000;">16</span> <span style="color: #0000ff;">Pixel</span> <span style="color: #000000;">2007</span> ;<br /> <span style="color: #0000ff;">Action</span><span style="color: #000000;">(</span>lRet:=.f.,oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> ToolTip <span style="color: #ff0000;">"Retornar"</span><br /><br /> oBrw:<span style="color: #000000;">SetMySQL</span><span style="color: #000000;">(</span>oPar<span style="color: #000000;">)</span><br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oDlg:<span style="color: #000000;">oClient</span> := oBrw<br /> oDlg:<span style="color: #000000;">lHelpIcon</span> := .f.<br /><br /> <span style="color: #0000ff;">Activate</span> <span style="color: #0000ff;">Dialog</span> oDlg <span style="color: #0000ff;">Centered</span> <span style="color: #0000ff;">On</span> <span style="color: #0000ff;">Init</span> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">If</span> lRet<br /> <span style="color: #00C800;">If</span> Len<span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">aSelected</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> aPes := oBrw:<span style="color: #000000;">aSelected</span><br /> <span style="color: #00C800;">EndIf</span><br /> <span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">(</span>lRet<span style="color: #000000;">)</span><br /> </div>[/code:36dec5ql]
Gracias
Rodrigo Melo |
xBrowse multi selects (resolvido) | Rodrigo, intenta con oBrw:aSelected |
xBrowse multi selects (resolvido) | Navarro,
Resolvido assim:
[code=fw:2h3vr45p]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">Function</span> GrupoListarPessoa<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Local</span> oDlg, oBrw, oSay, oPar, oCon, oRet, lRet := .f. <br /> <br /> <span style="color: #00C800;">If</span> ! Conectar<span style="color: #000000;">(</span>.f.<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Return</span><span style="color: #000000;">(</span><span style="color: #00C800;">Nil</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">EndIf</span><br /> oPar := oDba:<span style="color: #000000;">RowSet</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"select id,nom_pes from tb_pes order by nom_pes"</span>,,.t.<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">If</span> oPar == <span style="color: #00C800;">Nil</span><br /> <span style="color: #00C800;">Return</span><span style="color: #000000;">(</span>lRet<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">EndIf</span><br /><br /> <span style="color: #0000ff;">Define</span> <span style="color: #0000ff;">Dialog</span> oDlg <span style="color: #0000ff;">Title</span> <span style="color: #ff0000;">"Selecionar Participantes"</span> <span style="color: #0000ff;">Size</span> <span style="color: #000000;">516</span>,<span style="color: #000000;">358</span> <span style="color: #0000ff;">Of</span> oWnd <span style="color: #0000ff;">Pixel</span><br /><br /> @ <span style="color: #000000;">28</span>,<span style="color: #000000;">2</span> <span style="color: #0000ff;">xBrowse</span> oBrw <span style="color: #0000ff;">Of</span> oDlg DataSource oPar ;<br /> Columns <span style="color: #ff0000;">'id'</span>,<span style="color: #ff0000;">'nom_pes'</span> ;<br /> Headers <span style="color: #ff0000;">'ID'</span>,<span style="color: #ff0000;">'Pessoa'</span> ;<br /> Pictures <span style="color: #ff0000;">"999"</span>,<span style="color: #ff0000;">"@A"</span> ;<br /> ColSizes <span style="color: #000000;">60</span>,<span style="color: #000000;">400</span> ;<br /> <span style="color: #0000ff;">Font</span> oFnt2 <span style="color: #0000ff;">Size</span> <span style="color: #000000;">255</span>,<span style="color: #000000;">150</span> <span style="color: #0000ff;">Pixel</span> <span style="color: #0000ff;">UpDate</span> Cell AutoSort<br /><br /> oBrw:<span style="color: #000000;">nMarqueeStyle</span> := <span style="color: #000000;">5</span><br /> oBrw:<span style="color: #000000;">nDataType</span> := <span style="color: #000000;">64</span><br /> oBrw:<span style="color: #000000;">nRowDividerStyle</span> := <span style="color: #000000;">3</span><br /> oBrw:<span style="color: #000000;">nColDividerStyle</span> := <span style="color: #000000;">2</span><br /><br /> With Object oBrw:<span style="color: #000000;">InsCol</span><span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">bEditValue</span> := <span style="color: #000000;">{</span> || AScan<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aSelected</span>, oBrw:<span style="color: #000000;">BookMark</span> <span style="color: #000000;">)</span> > <span style="color: #000000;">0</span> <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">SetCheck</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> :<span style="color: #000000;">nHeadBmpNo</span> := <span style="color: #000000;">{</span> || <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> Len<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aSelected</span> <span style="color: #000000;">)</span> == oBrw:<span style="color: #000000;">nLen</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> End<br /><br /> oBrw:<span style="color: #000000;">bLClicked</span> := <span style="color: #000000;">{</span> |r,c,f,oBrw| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">MouseColPos</span><span style="color: #000000;">(</span> c <span style="color: #000000;">)</span> == <span style="color: #000000;">1</span> , ;<br /> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span> f := AScan<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aSelected</span>, oBrw:<span style="color: #000000;">BookMark</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> == <span style="color: #000000;">0</span>, ;<br /> AAdd<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aSelected</span>, oBrw:<span style="color: #000000;">BookMark</span> <span style="color: #000000;">)</span>, ;<br /> ADel<span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">aSelected</span>, f, .t. <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #00C800;">Nil</span> <span style="color: #000000;">)</span>, ;<br /> oBrw:<span style="color: #000000;">RefreshCurrent</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nHeadStrAlign</span> := <span style="color: #000000;">2</span><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nHeadStrAlign</span> := <span style="color: #000000;">2</span><br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span><span style="color: #000000;">3</span><span style="color: #000000;">]</span>:<span style="color: #000000;">nHeadStrAlign</span> := <span style="color: #000000;">0</span><br /> oBrw:<span style="color: #000000;">aJustify</span> := <span style="color: #000000;">{</span><span style="color: #000000;">2</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">0</span><span style="color: #000000;">}</span><br /><br /> oBrw:<span style="color: #000000;">bOnRefresh</span> := <span style="color: #000000;">{</span> || oSay:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> @ <span style="color: #000000;">8</span>,<span style="color: #000000;">05</span> <span style="color: #0000ff;">Say</span> <span style="color: #ff0000;">'Selecionados:'</span> <span style="color: #0000ff;">Of</span> oDlg <span style="color: #0000ff;">Pixel</span> <span style="color: #0000ff;">Font</span> oFnt2<br /> @ <span style="color: #000000;">8</span>,<span style="color: #000000;">48</span> <span style="color: #0000ff;">Say</span> oSay <span style="color: #0000ff;">Prompt</span> Len<span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">aSelected</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">Size</span> <span style="color: #000000;">12</span>,<span style="color: #000000;">12</span> <span style="color: #0000ff;">Of</span> oDlg <span style="color: #0000ff;">Pixel</span> <span style="color: #0000ff;">Font</span> oFnt2 <span style="color: #0000ff;">Picture</span> <span style="color: #ff0000;">'99'</span><br /><br /> @ <span style="color: #000000;">6</span>,<span style="color: #000000;">190</span> <span style="color: #0000ff;">BTNBMP</span> oCon <span style="color: #0000ff;">Resource</span> <span style="color: #ff0000;">'sel26'</span> <span style="color: #0000ff;">Of</span> oDlg <span style="color: #0000ff;">Size</span> <span style="color: #000000;">32</span>,<span style="color: #000000;">16</span> <span style="color: #0000ff;">Pixel</span> <span style="color: #000000;">2007</span> ;<br /> <span style="color: #0000ff;">Action</span><span style="color: #000000;">(</span>lRet:=.t.,aPes:=GrupoRecuperarPessoa<span style="color: #000000;">(</span>oBrw,oPar<span style="color: #000000;">)</span>,oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> ToolTip <span style="color: #ff0000;">"Confirmar os selecionados"</span><br /> @ <span style="color: #000000;">6</span>,<span style="color: #000000;">226</span> <span style="color: #0000ff;">BTNBMP</span> oRet <span style="color: #0000ff;">Resource</span> <span style="color: #ff0000;">'sair16'</span> <span style="color: #0000ff;">Of</span> oDlg <span style="color: #0000ff;">Size</span> <span style="color: #000000;">32</span>,<span style="color: #000000;">16</span> <span style="color: #0000ff;">Pixel</span> <span style="color: #000000;">2007</span> ;<br /> <span style="color: #0000ff;">Action</span><span style="color: #000000;">(</span>lRet:=.f.,aPes:=<span style="color: #000000;">{</span><span style="color: #000000;">}</span>,oDlg:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> ToolTip <span style="color: #ff0000;">"Retornar"</span><br /><br /> oBrw:<span style="color: #000000;">SetMySQL</span><span style="color: #000000;">(</span>oPar<span style="color: #000000;">)</span><br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oDlg:<span style="color: #000000;">oClient</span> := oBrw<br /> oDlg:<span style="color: #000000;">lHelpIcon</span> := .f.<br /><br /> <span style="color: #0000ff;">Activate</span> <span style="color: #0000ff;">Dialog</span> oDlg <span style="color: #0000ff;">Centered</span> <span style="color: #0000ff;">On</span> <span style="color: #0000ff;">Init</span> oBrw:<span style="color: #000000;">SetFocus</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">(</span>lRet<span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Function</span> GrupoRecuperarPessoa<span style="color: #000000;">(</span>oBrw,oPar<span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">Local</span> aVet := <span style="color: #000000;">{</span><span style="color: #000000;">}</span>, nCtr := <span style="color: #000000;">0</span><br /><br /> <span style="color: #00C800;">If</span> Len<span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">aSelected</span><span style="color: #000000;">)</span> > <span style="color: #000000;">0</span><br /> <span style="color: #00C800;">For</span> nCtr := <span style="color: #000000;">1</span> <span style="color: #0000ff;">To</span> Len<span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">aSelected</span><span style="color: #000000;">)</span><br /> oPar:<span style="color: #000000;">GoTo</span><span style="color: #000000;">(</span>oBrw:<span style="color: #000000;">aSelected</span><span style="color: #000000;">[</span>nCtr<span style="color: #000000;">]</span><span style="color: #000000;">)</span><br /> AAdd<span style="color: #000000;">(</span>aVet,oPar:<span style="color: #0000ff;">Id</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Next</span><br /> <span style="color: #00C800;">EndIf</span><br /><br /><span style="color: #00C800;">Return</span><span style="color: #000000;">(</span>aVet<span style="color: #000000;">)</span><br /> </div>[/code:2h3vr45p]
Agradecimento ao JMSilva (<!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->).
Um abraço!
Rodrigo Melo |
xBrowse multi selects (resolvido) | [quote:2yfpm10m] oBrw:nDataType := 64
[/quote:2yfpm10m]
This is wrong.
Correct nDataType is DATATYPE_ODBF (16)
XBrowse automatically decides the correct datatype, when you create the browse based on the type of DATASOURCE.
Not only that you do not have to assign the value yourself, but it is also highly undesirable as in the above case. |
xBrowse multi selects (resolvido) | Rao,
Tks. |
xBrowse nFreeze | Hi all,
i have xBrowse with an array as data source.
Each row has 3 columns.
The first 2 colums are for searching and the third column is editable.
nMarqueeStyle is MARQSTYLE_HIGHLCELL.
I want the browse starting with the cursor placed on the 3rd column.
I tried this by setting nFreeze to '2'.
But when the browse starts the 1th column is selected.
Am i doing something wrong?
Regards,
Detlef |
xBrowse nFreeze | Mr. Detlef
What about
[b:2ryz8ptn]oBrw:nColSel:=3[/b:2ryz8ptn]
[code:2ryz8ptn]ACTIVATE DIALOG oDLg ON INIT (oBrw:SetFocus(),oBrw:nColSel:=3)[/code:2ryz8ptn]
Regards
Anser |
xBrowse nFreeze | Hello Detlef,
There is still another way :
If You want to show the 3. Col at the first left-position :
( it moves the scrollbar to Col 3 )
[code:sku6w05t]
I := 1
FOR i := 1 to 3
oBrw:GoRight()
NEXT
[/code:sku6w05t]
egards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
xBrowse nFreeze | Hi Anser and Uwe,
thanks for your suggestions.
They both work fine.
I only wonder about the none working nFreeze ...
Regards,
Detlef |
xBrowse nFreeze | Hello Detlef,
< nFreeze > just keeps the selected Col's on screen ( doesn't set col-position ).
1 2 = Freeze
1 2 3 4 5 = All Col's
You move the horizontal scrollbar to the right
1 2 4 5 = visible
Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
xBrowse nFreeze | Please Try:
ACTIVATE WINDOW / DIALOG ..... ON INIT oBrw:SetPos( 1, 3 ) // first row, third column |
xBrowse nMoveType | Hi,
I have xBrowse without editabled columns
oBrw:nMoveType has no efect and cursor asways go right
Can i exclude this or make it nMoveType to have efect on non editabled columns
is it possible to define nMoveType for each column ?
Or someother solution please
Best regards, |
xBrowse nMoveType | Cursor moves like in Excel, under full control of the user. |
xBrowse nMoveType | Hi Rao,
Thanks for reply
I will try to control it with SelectCol() Method if no other solution,
One more question please ...
If lRecordSelector := .f. columns are numbered from 0 to Fcount() -1 ????
example SelectCol( 1 ) go to second column must i use SelectCol( 0 ) so cursor to go to first column ?
Best regards. |
xBrowse new line for DBF ... | Hi ,
I'm searching a solution , how to add a new blank line in the xBrowse , then fill this line with needful data and then validate ( for mandatory fields for sample ... ) and append a new record in DBF . Maybe you have a sample how to do something like that ? It seems that I can add a new record to dbf and then add something like ::lNew data and then must validate for a new record for adding fully . But this way don't meet for me , because if user refuse of this new record , then this record must be deleted , so this isn't a good . I'm thinking that in this place the best solution will be something like a la buffer . But I don't know how to do that with xBrowse and DBF . Maybe I can add buffer in DBF ?
With best regards ! |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.