Page 2 of 3

Re: Are there any Treeview samples with associated edit boxes?

PostPosted: Sun Nov 29, 2020 3:57 pm
by Antonio Linares
Support for RichEdit5 from pim.prg:

EXE and full source code:
https://github.com/FiveTechSoft/FWH_tools/blob/master/pim.zip

Image

Re: Are there any Treeview samples with associated edit boxes?

PostPosted: Sun Nov 29, 2020 7:46 pm
by FWExplorer
You're moving faster than we can absorb it.

No problem building the last version. Looks like the environmental issues are resolving, notwithstanding climate change.


Is the name of this - Pim - too generic? Should it be titled 'FWPim' or 'Fim', for short?




Antonio Linares wrote:Support for RichEdit5 from pim.prg:

EXE and full source code:
https://github.com/FiveTechSoft/FWH_tools/blob/master/pim.zip

Image

Re: Are there any Treeview samples with associated edit boxes?

PostPosted: Sun Nov 29, 2020 9:06 pm
by FWExplorer
plus2.bmp is missing from the 16x16 folder, but it is in the 32x32 folder, in c:\fwh


────────────────────────────────────────────────────────────────────────────┐
│ FiveWin for Harbour 20.08 - Aug. 2020 Harbour development power │▄
│ (c) FiveTech 1993-2020 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 │█
└────────────────────────────────────────────────────────────────────────────┘█
  ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Compiling...
Harbour 3.2.0dev (r2008190002)
Copyright (c) 1999-2020, https://harbour.github.io/
Compiling 'pim.prg' and generating preprocessed output to 'pim.ppo'...
Lines 5928, Functions/Procedures 14
Generating C source output to 'pim.c'... Done.
Embarcadero C++ 7.00 for Win32 Copyright (c) 1993-2015 Embarcadero Technologies, Inc.
pim.c:
Borland Resource Compiler Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.

Error pim.RC 26 17: Cannot open file: ../bitmaps/16x16/plus2.bmp
* Linking errors *

Re: Are there any Treeview samples with associated edit boxes?

PostPosted: Mon Nov 30, 2020 8:27 am
by Antonio Linares
D.

missing bitmaps added into pim.zip

We are focused on functionality and bugs detecting and solving. We can rename it later on

Re: Are there any Treeview samples with associated edit boxes?

PostPosted: Tue Dec 01, 2020 2:20 pm
by FWExplorer
Antonio,

Are you looking for feedback, regarding the pim? Not sure if I should keep adding my two cents.

Coupla of things.

Can the edit of a mode be done in place, rather than in a popup?

Also, I'm not clear on how keystrokes are processed. Is it based on the scancode in ctscan.ch? I tried changing it to other keystrokes, but it didn't respond.

Code: Select all  Expand view
  oTree:bKeyChar = { | nKey | If( nKey == 43, TreeAddItem( oTree ),) }

Re: Are there any Treeview samples with associated edit boxes?

PostPosted: Tue Dec 01, 2020 5:04 pm
by Antonio Linares
D.

Yes, feedback is welcome and appreciated :-)

> Can the edit of a mode be done in place, rather than in a popup?

We are working to implement it for FWH itself

Please try it this way:
oTree:bKeyChar = { | nKey, nFlags | MsgInfo( nKey, "key" ), MsgInfo( nFlags ), If( nKey == 43, TreeAddItem( oTree ),) }

Re: Are there any Treeview samples with associated edit boxes?

PostPosted: Tue Dec 01, 2020 9:14 pm
by FWExplorer
I'll try it, but typo on 'Msgnfo'.

Re: Are there any Treeview samples with associated edit boxes?

PostPosted: Tue Dec 01, 2020 9:25 pm
by FWExplorer
It doesn't matter what key we give it, explicitly. It only works for the numberic keypad 43.


oTree:bKeyChar = { | nKey, nFlags | MsgInfo( nKey, "key" ), MsgInfo( nFlags ), If( nKey == 224, TreeAddItem( oTree ),) }

Re: Are there any Treeview samples with associated edit boxes?

PostPosted: Wed Dec 02, 2020 12:02 pm
by Antonio Linares
Enhanced version with RichEdit button bar support:
Image

There is a position bug in the RichEdit buttonbar, when some text is written into the RichEdit. We
are working to solve it.

Please download pim.zip again from:
https://github.com/FiveTechSoft/FWH_tools/blob/master/pim.zip

Notice that we are already testing the TreeView inline editing but it is not working yet. Also this pim.exe
requires an updated FWH build

Re: Are there any Treeview samples with associated edit boxes?

PostPosted: Wed Dec 02, 2020 12:04 pm
by Antonio Linares
FWExplorer wrote:It doesn't matter what key we give it, explicitly. It only works for the numberic keypad 43.


oTree:bKeyChar = { | nKey, nFlags | MsgInfo( nKey, "key" ), MsgInfo( nFlags ), If( nKey == 224, TreeAddItem( oTree ),) }


We are going to check it, thanks

Re: Are there any Treeview samples with associated edit boxes?

PostPosted: Thu Dec 03, 2020 6:22 pm
by Antonio Linares
Updated version:

TreeView inline editing support:
https://github.com/FiveTechSoft/FWH_tools/blob/master/pim.zip

Move the mouse over the top part of the richedit to show the buttonbar

Re: Are there any Treeview samples with associated edit boxes?

PostPosted: Fri Dec 04, 2020 1:24 am
by FWExplorer
Can't build the latest pim.

Compiling 'pim.prg' and generating preprocessed output to 'pim.ppo'...
1 error

No code generated.
pim.prg(206) Error E0030 Syntax error "syntax error at '@'"
* Compile errors *

[C:\fwh\samples]


I downloaded fwh.exe from ftdn today, and it's the same fwh.exe executable as a few days ago. Version 20.08.1.

Re: Are there any Treeview samples with associated edit boxes?

PostPosted: Fri Dec 04, 2020 8:50 am
by Antonio Linares
D.

A new FWH build is required to build pim.exe

I am sending you an email

Re: Are there any Treeview samples with associated edit boxes?

PostPosted: Fri Dec 04, 2020 1:25 pm
by FWExplorer
Thanks Antonio, I got the libs. But it's a compiler error, not a link error.


ompiling...
Harbour 3.2.0dev (r2008190002)
Copyright (c) 1999-2020, https://harbour.github.io/
Compiling 'pim.prg' and generating preprocessed output to 'pim.ppo'...
1 error

No code generated.
pim.prg(206) Error E0030 Syntax error "syntax error at '@'"
* Compile errors *

[C:\fwh\samples]


I downloaded the most recent fwh.exe, yesterday. Is there an update to the include files?

This is where the compile error occurs:


Code: Select all  Expand view
  @ 0, 205 RICHEDIT5 oMemo VAR cItemText OF oWndData SIZE 300, 100 PIXEL BARBUTTON ;
      ON CHANGE ( cItemText := oMemo:SaveAsRTF(), oBtnSave:Enable(), oMemo:Cargo := .T.,;
                  If( oTree:GetSelected() != nil, oTree:GetSelected():Cargo := cItemText,) )                  
 

Re: Are there any Treeview samples with associated edit boxes?

PostPosted: Fri Dec 04, 2020 1:58 pm
by cnavarro
Use this file richedi5.ch

Code: Select all  Expand view

#ifndef _RICHEDIT5_CH
#define _RICHEDIT5_CH

#ifndef SF_RTF
#define SF_RTF                   2
#endif
#ifndef SFF_SELECTION
#define SFF_SELECTION            32768
#endif

#ifndef EM_GETSEL
#define EM_GETSEL                176
#endif
#ifndef EM_SCROLL
#define EM_SCROLL                181
#endif
#ifndef EM_GETMODIFY
#define EM_GETMODIFY             184
#endif
#ifndef EM_SETMODIFY
#define EM_SETMODIFY             185
#endif
#ifndef EM_GETLINECOUNT
#define EM_GETLINECOUNT          186
#endif
#ifndef EM_LINEINDEX
#define EM_LINEINDEX             187
#endif
#ifndef EM_CANUNDO
#define EM_CANUNDO               198
#endif
#ifndef EM_REPLACESEL
#define EM_REPLACESEL            194
#endif
#ifndef EM_UNDO
#define EM_UNDO                  199
#endif
#ifndef EM_POSFROMCHAR
#define EM_POSFROMCHAR           ( WM_USER + 38 )
#endif
#ifndef EM_SCROLLCARET
#define EM_SCROLLCARET           ( WM_USER + 49 )
#endif
#ifndef EM_CANPASTE
#define EM_CANPASTE              ( WM_USER + 50 )
#endif
#ifndef EM_EXLIMITTEXT
#define EM_EXLIMITTEXT           ( WM_USER + 53 )
#endif
#ifndef EM_EXLINEFROMCHAR
#define EM_EXLINEFROMCHAR        ( WM_USER + 54 )
#endif
#ifndef EM_GETSELTEXT
#define EM_GETSELTEXT            ( WM_USER + 62 )
#endif
#ifndef EM_SETBKGNDCOLOR
#define EM_SETBKGNDCOLOR         ( WM_USER + 67 )
#endif
#ifndef EM_SETOPTIONS
#define EM_SETOPTIONS            ( WM_USER + 77 )
#endif

#ifndef _RICHEDIT_CH
#define CFM_BOLD                 1
#define CFM_ITALIC               2
#define CFM_UNDERLINE            4
#define CFM_STRIKEOUT            8

#define CFE_BOLD                 1
#define CFE_ITALIC               2
#define CFE_UNDERLINE            4
#define CFE_STRIKEOUT            8

#define PFA_LEFT                 1
#define PFA_RIGHT                2
#define PFA_CENTER               3
#define PFA_JUSTIFY              4

#define SF_TEXT                  1

#define EM_SETUNDOLIMIT          ( WM_USER + 82 )
#define EM_REDO                  ( WM_USER + 84 )
#define EM_CANREDO               ( WM_USER + 85 )
#define EM_GETAUTOURLDETECT      ( WM_USER + 91 )

#define EM_SETTYPOGRAPHYOPTIONS  ( WM_USER + 202 )
#define EM_GETTYPOGRAPHYOPTIONS  ( WM_USER + 203 )

#define EN_LINK                  1803

#define ES_DISABLENOSCROLL       8192

#define ECO_READONLY             2048

#define ECOOP_OR                 2
#define ECOOP_XOR                4

#define TO_ADVANCEDTYPOGRAPHY    1
#endif

#xcommand REDEFINE RICHEDIT5 [ <oRTF> VAR ] <uVar> ;
             [ ID <nId> ] ;
             [ <dlg: OF, WINDOW, DIALOG> <oDlg> ] ;
             [ <help:HELPID, HELP ID> <nHelpId> ] ;
             [ FONT <oFont> ] ;
             [ MESSAGE <cMsg> ] ;
             [ <readonly: READONLY, NO MODIFY> ] ;
             [ <lHighlight: HIGHLIGHT> ] ;
             [ <file: FILE, FILENAME> <cFileName> ] ;
             [ RTFSIZE <nRTFSize> ] ;
             [ <lNoURL: NO URL> ] ;
             [ WHEN <uWhen> ] ;
             [ VALID <uValid> ] ;
             [ ON CHANGE <uChange> ] ;
             [ MARGINLEFT <nLeftMargin> ] ;
       => ;
          [ <oRTF> := ] TRichEdit5():ReDefine( <nId>, bSETGET(<uVar>), ;
                        <oDlg>, <nHelpId>, <oFont>, <cMsg>, <.readonly.>, ;
                        <.lHighlight.>, <cFileName>, <nRTFSize>, ;
                        <.lNoURL.>, <{uWhen}>, <{uValid}>, ;
                        [\{|nKey, nFlags, Self| <uChange>\}], <nLeftMargin> )

#command @ <nTop>, <nLeft> RICHEDIT5 [ <oRTF> VAR ] <uVar> ;
             [ <dlg: OF, WINDOW, DIALOG> <oWnd> ] ;
             [ SIZE <nWidth>, <nHeight> ] ;
             [ FONT <oFont> ] ;
             [ <pixel: PIXEL> ] ;
             [ MESSAGE <cMsg> ] ;
             [ <lHScroll: HSCROLL> ] ;
             [ <readonly: READONLY, NO MODIFY> ] ;
             [ WHEN <uWhen> ] ;
             [ VALID <uValid> ] ;
             [ ON CHANGE <uChange> ] ;
             [ <lDesign: DESIGN> ] ;
             [ <lHighlight: HIGHLIGHT> ] ;
             [ <file: FILE, FILENAME> <cFileName> ] ;
             [ RTFSIZE <nRTFSize> ] ;
             [ <lNoURL: NO URL> ] ;
             [ <lNoScroll: NO SCROLL> ] ;
             [ <lNoBorder: NOBORDER, NO BORDER> ] ;
             [ MARGINLEFT <nLeftMargin> ] ;
             [ <lBar: BARBUTTON> ] ;
       => ;
          [ <oRTF> := ] TRichEdit5():New( <nTop>, <nLeft>, bSETGET(<uVar>), ;
                        [<oWnd>], <nWidth>, <nHeight>, <oFont>, <.pixel.>, ;
                        <cMsg>, <.lHScroll.>, <.readonly.>, <{uWhen}>, ;
                        <{uValid}>, [\{|nKey, nFlags, Self| <uChange>\}], ;
                        <.lDesign.>, <.lHighlight.>, <cFileName>, <nRTFSize>, ;
                        <.lNoURL.>, <.lNoScroll.>, [<.lNoBorder.>], <nLeftMargin>, , <.lBar.> )

#endif