English
Forum

Listbox/GridBOX Entries edit

 
- Page 1 -



Christof
Neuß
Hi,

as front-End for Datenbankanwendungen eignet itself even often one Browse-Window. thereby can The data directly in a kind scheduler (z.B. GridBOX) displayed and machine go.

The dialogs "Listbox" and "Gridbox" from XProfan wären really prädestiniert, this To do. unfortunately there no (simple) Possibility, The Entries directly To edit.

i know, that it z.B. with the List view.dll goes. so have so did i already experimentiert. Since I but possible little/no external DLLs benefit would like, would a Solution with "Bordmitteln" genial.

has really time someone this Ansatz here weiterverfolgt?
Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) in The Babyklappe on XProfan.Com stored:
Listboxeinträge edit
executable ex Profan-Version 5.0
********************** HINWEISE ********************************
CODE CREATED MIT ROKOS OBJECT CREATOR 2.8c
DATUM  31.01.2003    circa  22:33 watch
VERWENDETE PROFANVERSION IST 7.0 ODER HÖHER
ONLY FOR UNSORTIERTE LISTBOX GÜLTIG!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Def GetSysColor(1) !USER32,GetSysColor
SETTRUECOLOR 1
DECLARE ENDE%,editfeld%,top%
DECLARE LISTBOX1%,font%,font2%,Text%
DECLARE BUTTON1%,listindex%,gtext$
font%=@CREATE(FONT,MS Sans Serif,13,0,0,0,0)
WINDOWSTYLE 63
WINDOWTITLE EDITLISTBOX (c) by Rolf cook 2003
WINDOW 214,134-429,218
CLS GETSYSCOLOR(15)
USEFONT MS Sans Serif,8,0,0,0,0
SETDIALOGFONT 1
LISTBOX1% = CREATE(LISTBOX,%HWND,LISTBOX1,0012,0013,0401,0107)
TEXT% = CREATE(TEXT,%HWND,Please entry You can and edit - Cursor must during the input in the Listbox stay!,0012,0123,0400,040)
BUTTON1% = CREATE(BUTTON,%HWND,Good by,0091,0150,0228,0033)
EDITFELD%=@Control(EDIT,,$54010000,0,0,0,0,listbox1%,1000,%HINSTANCE)
setfont editfeld%,font%
clearlist
addstring(listbox1%,Test1 the Listbox)
addstring(listbox1%,Test2 the Listbox)
addstring(listbox1%,Test3 the Listbox)
addstring(listbox1%,Test4 the Listbox)
addstring(listbox1%,Test5 the Listbox)
addstring(listbox1%,Test6 the Listbox)
addstring(listbox1%,Test7 the Listbox)
addstring(listbox1%,Test8 the Listbox)
addstring(listbox1%,Test9 the Listbox)
addstring(listbox1%,Test10 the Listbox)
addstring(listbox1%,Test11 the Listbox)
addstring(listbox1%,Test12 the Listbox)
addstring(listbox1%,Test13 the Listbox)
addstring(listbox1%,Test14 the Listbox)
addstring(listbox1%,Test15 the Listbox)
addstring(listbox1%,Test16 the Listbox)
addstring(listbox1%,Test17 the Listbox)
addstring(listbox1%,Test18 the Listbox)
addstring(listbox1%,Test19 the Listbox)
addstring(listbox1%,Test20 the Listbox)
addstring(listbox1%,Test21 the Listbox)
addstring(listbox1%,Test22 the Listbox)
addstring(listbox1%,Test23 the Listbox)
addstring(listbox1%,Test24 the Listbox)
addstring(listbox1%,Test25 the Listbox)

WHILENOT ENDE%

    WAITINPUT

    If @EQU(%KEY,2)

        LET ENDE%= 1

    ELSEIF GETFOCUS(LISTBOX1%) LISTBOX

        listindex%=@GetCursel(listbox1%)

        ifnot lt(listindex%,0)

            Top%=@SendMessage(Listbox1%,398,0,0)
            @SendMessage(listbox1%,$0186,-1,0)
            settext editfeld%,@GetString$(listbox1%,listindex%)
            setwindowpos Editfeld%=2,mul(sub(listindex%,top%),13)-430,13;0
            setfocus(editfeld%)
            sendmessage(editfeld%,$00B1,add(len(gettext$(editfeld%)),1),-1)

            WHILE GETFOCUS(editfeld%) DUMMYSCHLEIFE

                getmessage

                if equ(%message,160)

                    setfocus(%hwnd)

                endif

            WEND

            GTEXT$=gettext$(editfeld%)
            @DeleteString(Listbox1%,listindex%)
            @InsertString(Listbox1%,listindex%,gtext$)
            setwindowpos Editfeld%=0,0-0,0;0
            setwindowpos listbox1%=0012,0013-0401,0107;0

        endif

    ELSEIF GETFOCUS(BUTTON1%) BUTTON

        LET ENDE%=1

    ENDIF

WEND

Deleteobject font%

or has someone another idea, How one a Datenbrowser with Editiermöglichkeit release could?

be tensely and each Info grateful.

Vielen Thanks and greetings

Christof
 
XProfan X3
Win10 16 GB RAM
10/18/16  
 



 
- Page 1 -



Christof
Neuß
Hello Thomas,

this is Yes calm. thanks!

Sorry. momentarily come I do not so really moreover, me so To keep busy. but the make I on each drop yet.

Greeting

Christof
 
XProfan X3
Win10 16 GB RAM
10/30/16  
 




Matthias
Arlt
Have the Example of Thomas the better Overview because of time the integral minimizes and something modifiziert. so ought to it really too independent of the Win-Version fit...
Window 0,0 - 600,410
declare LV&,Spalte&,Zeile&,Item&,Edit&,Font&,Txt$
declare rect#,cellpos_x%,cellpos_y%,cellwidth%,cellhight%
Font&=CreateFont("Verdana",16,0,0,0,0)
SetDialogFont Font&
LV&=Create("GridBox",%hwnd,"x;1;0;Spalte 1;1;60;Spalte 2;1;120;Spalte 3;1;80;Spalte 4;1;80;Spalte 5;1;80",0,10,10,460,250)
Addstring(LV&,"0.5|0|0|0|0|0")
Addstring(LV&,"2|1|0|0|0|0")
Addstring(LV&,"1|2|0|0|0|0")
Addstring(LV&,"2|3|0|0|0|0")
Addstring(LV&,"0.5|4|0|0|0|0")
SetFont LV&,Font&
SubClass %hwnd, 1
usermessages 2000

while 1

    waitinput

    if (%umessage = 2000)

        Txt$ = GetText$(LV&,&uwparam,&ulparam)
        Spalte&= &ulparam
        Zeile&= &uwparam
        dim rect#,16
        SendMessage(LV&,$100E,Zeile&,rect#)'LVM_GETITEMRECT
        cellpos_x% = long(rect#,0)
        cellpos_y% = long(rect#,4) - 1
        cellwidth% = sendmessage(LV&,$101D,Spalte&,0)
        cellhight% = (long(rect#,12) - long(rect#,4)) + 1

        if Spalte& > 0

            whileloop 0,(Spalte& - 1),1

                cellpos_x% = cellpos_x% + sendmessage(LV&,$101D,&loop,0)

            wend

        endif

        dispose rect#
        Edit& = create("Edit",LV&,Txt$,cellpos_x%,cellpos_y%,cellwidth%,cellhight%)
        setfont Edit&,Font&
        setfocus(Edit&)
        'SendMessage(Edit&,"+({END})") 'Cursor ans end settle...
        SendMessage(Edit&,$B1,0,-1)'or everything Mark...

        while getfocus(Edit&)

            waitinput

        wend

        settext LV&,Zeile&,Spalte&,gettext$(Edit&)
        destroywindow(Edit&)
        setfocus(%hwnd)

    endif

wend

usermessages 0
SubClass %hwnd, 0
end

SubClassProc

    if SubClassMessage(%hwnd, 78)'WM_NOTIFY

        if (Long(&sLParam,8) = -3)

            Item&=Long(&sLParam,12)

            if (Item& <> -1)

                SendMessage(%hwnd,2000,Item&,Long(&sLParam,16))

            endif

        endif

    endif

endproc

 
WinXP SP2, Win7 - XProfan 10/11/FreeProfan32 - Xpia
11/02/16  
 




Thomas
Freier
class, and Please to the Quelltexten as GridBOX with Item-Edit .
 
Gruß Thomas
Windows XP SP2, XProfan X2
11/02/16  
 




Matthias
Arlt
watts soeben Done...

Greeting Matthias
 
WinXP SP2, Win7 - XProfan 10/11/FreeProfan32 - Xpia
11/02/16  
 




Christof
Neuß
Hey, this is Yes class!!!

Vielen Thanks!

wars I it yourself there, that The input for Abschluss on ENTER (and/or Pfeiltasten) reacted, instead of only on Click into next area?

Greeting

Christof
 
XProfan X3
Win10 16 GB RAM
11/04/16  
 




Thomas
Freier
Yes over The 'AddHotKey's.
should then but over The Pfeiltasten the next Item edited go, must You The EDIT-Positionswerte (Spalte& or. Zeile& Change) new detect, means own Proc.
here undertaking only ENTER, arrow left or right whom new worth.
Window 0,0 - 600,410
declare LV&,Spalte&,Zeile&,Item&,Edit&,Font&,Txt$
declare rect#,cellpos_x%,cellpos_y%,cellwidth%,cellhight%
Font&=CreateFont("Verdana",16,0,0,0,0)
SetDialogFont Font&
LV&=Create("GridBox",%hwnd,"x;1;0;Spalte 1;1;60;Spalte 2;1;120;Spalte 3;1;80;Spalte 4;1;80;Spalte 5;1;80",0,10,10,460,250)
Addstring(LV&,"0.5|0|0|0|0|0")
Addstring(LV&,"2|1|0|0|0|0")
Addstring(LV&,"1|2|0|0|0|0")
Addstring(LV&,"2|3|0|0|0|0")
Addstring(LV&,"0.5|4|0|0|0|0")
SetFont LV&,Font&
SubClass %hwnd, 1
usermessages 2000
WAY from 7001, 13, 0'Return
WAY from 7002, 37, 0'arrow left
WAY from 7003, 39, 0'arrow right

while 1

    waitinput

    if (%umessage = 2000)

        Txt$ = GetText$(LV&,&uwparam,&ulparam)
        Spalte&= &ulparam
        Zeile&= &uwparam
        ' values for the EDIT
        dim rect#,16
        SendMessage(LV&,$100E,Zeile&,rect#)'LVM_GETITEMRECT
        cellpos_x% = long(rect#,0)
        cellpos_y% = long(rect#,4) - 1
        cellwidth% = sendmessage(LV&,$101D,Spalte&,0)
        cellhight% = (long(rect#,12) - long(rect#,4)) + 1

        if Spalte& > 0

            whileloop 0,(Spalte& - 1),1

                cellpos_x% = cellpos_x% + sendmessage(LV&,$101D,&loop,0)

            wend

        endif

        dispose rect#
        ' EDIT
        Edit& = create("Edit",LV&,Txt$,cellpos_x%,cellpos_y%,cellwidth%,cellhight%)
        setfont Edit&,Font&
        setfocus(Edit&)
        'SendMessage(Edit&,"+({END})") 'Cursor ans end settle...
        SendMessage(Edit&,$B1,0,-1)'or everything Mark...

        while 1

            waitinput

            If MenuItem(7001) OR MenuItem(7002) OR MenuItem(7003)

                settext LV&,Zeile&,Spalte&,gettext$(Edit&)
                destroywindow(Edit&)
                break

            Else

                destroywindow(Edit&)
                break

            Endif

        wend

        SendMessage(LV&,$102A,0,0)'LV new draw
        setfocus(%hwnd)

    endif

wend

usermessages 0
SubClass %hwnd, 0
end

SubClassProc

    if SubClassMessage(%hwnd, 78)'WM_NOTIFY

        if (Long(&sLParam,8) = -3)

            Item&=Long(&sLParam,12)

            if (Item& <> -1)

                SendMessage(%hwnd,2000,Item&,Long(&sLParam,16))

            endif

        endif

    endif

endproc

 
Gruß Thomas
Windows XP SP2, XProfan X2
11/04/16  
 




Matthias
Arlt
...or bspw. so:
Window 0,0 - 600,410
declare LV&,Spalte&,Zeile&,Item&,Edit&,Font&,Txt$
declare rect#,cellpos_x%,cellpos_y%,cellwidth%,cellhight%
Font&=CreateFont("Verdana",16,0,0,0,0)
SetDialogFont Font&
LV&=Create("GridBox",%hwnd,"x;1;0;Spalte 1;1;60;Spalte 2;1;120;Spalte 3;1;80;Spalte 4;1;80;Spalte 5;1;80",0,10,10,460,250)
Addstring(LV&,"0.5|0|0|0|0|0")
Addstring(LV&,"2|1|0|0|0|0")
Addstring(LV&,"1|2|0|0|0|0")
Addstring(LV&,"2|3|0|0|0|0")
Addstring(LV&,"0.5|4|0|0|0|0")
SetFont LV&,Font&
SubClass %hwnd, 1
usermessages 2000
WAY from 13, 13, 0
WAY from 37, 37, 0
WAY from 38, 38, 0
WAY from 39, 39, 0
WAY from 40, 40, 0

while 1

    waitinput

    if (%umessage = 2000)

        Txt$ = GetText$(LV&,&uwparam,&ulparam)
        Spalte&= &ulparam
        Zeile&= &uwparam
        dim rect#,16
        SendMessage(LV&,$100E,Zeile&,rect#)'LVM_GETITEMRECT
        cellpos_x% = long(rect#,0)
        cellpos_y% = long(rect#,4) - 1
        cellwidth% = sendmessage(LV&,$101D,Spalte&,0)
        cellhight% = (long(rect#,12) - long(rect#,4)) + 1

        if Spalte& > 0

            whileloop 0,(Spalte& - 1),1

                cellpos_x% = cellpos_x% + sendmessage(LV&,$101D,&loop,0)

            wend

        endif

        dispose rect#
        Edit& = create("Edit",LV&,Txt$,cellpos_x%,cellpos_y%,cellwidth%,cellhight%)
        setfont Edit&,Font&
        setfocus(Edit&)
        'SendMessage(Edit&,"+({END})") 'Cursor ans end settle...
        SendMessage(Edit&,$B1,0,-1)'or everything Mark...

        while getfocus(Edit&)

            waitinput

            if (%menuitem = 13)

                break

            elseif (%menuitem = 37) | (%menuitem = 38) | (%menuitem = 39) | (%menuitem = 40)

                case (%menuitem = 37) : SendMessage(%hwnd,2000,(Zeile&),(Spalte& - 1))
                case (%menuitem = 38) : SendMessage(%hwnd,2000,(Zeile& - 1),Spalte&)
                case (%menuitem = 39) : SendMessage(%hwnd,2000,(Zeile&),(Spalte& + 1))
                case (%menuitem = 40) : SendMessage(%hwnd,2000,(Zeile& + 1),Spalte&)
                break

            endif

        wend

        settext LV&,Zeile&,Spalte&,gettext$(Edit&)
        destroywindow(Edit&)
        setfocus(%hwnd)

    endif

wend

usermessages 0
SubClass %hwnd, 0
end

SubClassProc

    if SubClassMessage(%hwnd, 78)'WM_NOTIFY

        if (Long(&sLParam,8) = -3)

            Item&=Long(&sLParam,12)

            if (Item& <> -1)

                SendMessage(%hwnd,2000,Item&,Long(&sLParam,16))

            endif

        endif

    endif

endproc

 
WinXP SP2, Win7 - XProfan 10/11/FreeProfan32 - Xpia
11/04/16  
 




Alibre
Yes, this is Yes Genial!
Vielen Thanks all!
 
XProfan X4
PRFellow für ProfanX4 -> Das wär was!
01/28/21  
 



 
- Page 2 -



Alibre
Hello together I bin's again.

Related to the edit the GridBOX is super!

but how can I The GridBOX additional Drag & Drop - susceptible make?

best Thanks and Regards,
André
 
XProfan X4
PRFellow für ProfanX4 -> Das wär was!
02/22/21  
 




Georg
Teles
Hello,

I make the anhand one very middle-aged Beispiels, here have I with my Archivierer The GridBOX with D&D To Nutze made circa way, Dateiname, Size and CRC-amount List To let.
Declare end%, tmpGrid&, Grid&
Def DragFinish(1)!"SHELL32","DragFinish"
Def DragQueryFile(4)!"SHELL32","DragQueryFileA"
Def DragAcceptFiles(2)!"SHELL32","DragAcceptFiles"
Window 0,0-1024,500
tmpGrid& = Create("Grid",1,0)
Grid& = Create("GridBox",%hWnd,"Datei;0;200;Pfad;0;200;Größe;1;200",0,5,5,900,200)
Clear end%
DragAcceptFiles(%hWnd,1)
User Messages $233

WhileNot end%

    Waitinput

    If %Umessage = $233

        DragDrop()' add

    EndIf

EndWhile

DragAcceptFiles(%hWnd,0)

Proc DragDrop

    ClearList
    ClearList tmpGrid&
    Declare Files#,Anzahl&,Path$,File$,i%,fileSize$
    Dim Files#,261
    Anzahl& = DragQueryFile(&WParam,$FFFFFFFF,Files#,261)
    Clear i%

    While (i% < Anzahl&)

        DragQueryFile(&WParam,i%,Files#,261)
        File$ = String $(Files#,0)

        If DirExists(File$)

            ChDir File$
            AddFiles * "*.*"

        Else

            AddStrings File$

        EndIf

        Inc i%

    EndWhile

    DragFinish(&WParam)
    Anzahl& = MoveListToHandle(tmpGrid&)

    WhileLoop 0,(Anzahl&-1)

        Path$ = GetString$(tmpGrid&,&loop)
        File$ = SubStr$(Path$,-1,"\\")
        Path$ = Translate$(Path$,File$,"")
        fileSize$ = Str $(FileSize(Path$+File$))+" byte(s)"
        AddStrings(Grid&,File$+"|"+Path$+"|"+fileSize$)

    Endwhile

    ClearList
    ClearList tmpGrid&
    Select String(Grid&,-1,GetString$(Grid&,0))
    Dispose Files#

ENDPROC


Regards
 
TC-Programming [...] 
XProfan 8.0 - 10.0 - X2 - X3 - X4

02/22/21  
 




H.Brill
if You The List view.dll using, to the You in another
mail demand have : Drag&Drop becomes there very well supported.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
02/23/21  
 




RudiB.
Have me the Topic too time angeschaut and what built....

Download

simply test times....

Greeting from munich
Rudi

5 kB
Kurzbeschreibung: Listboxes Zeilenhöhe Change / edit
Hochgeladen:03/14/21
Downloadcounter131
Download
 
Xprofan X4
Rudolf Beske / München

Hardware: NB Intel I9 - 16GByte RAM
03/14/21  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

11.529 Views

Untitledvor 0 min.
Gast.0815 vor 6 Tagen
Walter05/03/24
Rainer Hoefs05/10/23
Hans Neff01/24/23
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie