Liberty BASIC Community Forum
« Eye On SQL »

Welcome Guest. Please Login or Register.
Sep 21st, 2017, 12:16am


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1 2 3  Notify Send Topic Print
 veryhotthread  Author  Topic: Eye On SQL  (Read 891 times)
CarlGundel
Administrator
ImageImageImageImageImage


member is offline

Avatar

author of Liberty BASIC


Homepage PM


Posts: 2833
xx Re: Eye On SQL
« Reply #15 on: Jul 13th, 2017, 07:40am »

Maybe this will also be helpful?

http://basic.wikispaces.com/Spreadsheet

-Carl
User IP Logged

author of Liberty BASIC
http://www.libertybasic.com
Brandon Parker
Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1115
xx Re: Eye On SQL
« Reply #16 on: Jul 13th, 2017, 10:22pm »

Lauri,
I must apologize; as I was looking through old threads I came across a thread where I was supposed to send you some code, but I believe I failed to do so. I am very sorry for that; life must have gotten me caught up with something.

I have mounds of code available for ListView stuff so I'll put something together tomorrow night or Saturday. I will be driving all day tomorrow so it might be late or as I mentioned Saturday, but I will get something together very soon.

Are there any specific requests with managing ListViews from this topic? I'll try to get them into an example if you post the needs for this topic.


{:0)

Brandon Parker
User IP Logged

Windows 7 Home Premium 64-bit Intel(R) Quad Core(TM) i5 CPU M 430 @ 2.27GHz 4GB DDR3 RAM
metro
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 194
xx Re: Eye On SQL
« Reply #17 on: Jul 13th, 2017, 11:42pm »

Quote:
I must apologize; as I was looking through old threads I came across a thread where I was supposed to send you some code,


to quote the least offensive of the Aussie vernacular "no worries"

don't stress Brandon, there's plenty of info out there for me to digest

All day driving is something we do here a lot, I'm visiting my son next week a leisurely 1600 klm drive (1000 miles in your lingo)

I appreciate you taking the time
User IP Logged

Win10 64 HP laptop + desktop Mint Linux 64bit
metro
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 194
xx Re: Eye On SQL
« Reply #18 on: Jul 14th, 2017, 01:52am »

until we get a handle on how to tackle a GridView is something like this an option
it needs a tidy up. and integrating into the ionSql.
Code:
[editrow]
    timer 0
print c
    dim array$(c) ' c was used to create the column count
    for z= 1 to c
    array$(z) =  word$(rowdata$(LVITEM.iItem.struct),z,"   ")
    next z



    WindowWidth = 313
    WindowHeight = 300
    UpperLeftX=int((DisplayWidth-WindowWidth)/2)
    UpperLeftY=int((DisplayHeight-WindowHeight)/2)

    listbox #main2.listbox1, array$(),[listSelect],  1,  1,302,180
    button #main2.default,"Hiden",   [listSelect],ul,-400,-400,  0,  0
    button #main2.BtnSave,"SAVE",   [saverow],ul,100,200,  100, 25
    open "Select Field to Edit..Press Enter" for dialog as #main2
    print #main2, "font Times_New_Roman  10 bold"
    print #main2, "trapclose [quit.main]"
    print  #main2.listbox1, "selectindex 1"
    wait

[listSelect]
    print #main2.listbox1,"selectionindex? index"
  '  notice "You selected - "; array$(index)
    gosub [editfield]
    wait

[quit.main]
    close #main2
wait

[editfield]
    WindowWidth = 313
    WindowHeight = 230
    UpperLeftX=int((DisplayWidth-WindowWidth)/2)
    UpperLeftY=int((DisplayHeight-WindowHeight)/2)

    textbox  #fldEdit.TbEdit ,  10,  30,280,25

     button #fldEdit.default,"Hiden",   [ModFld],ul,-400,-400,  0,  0

    open "Modify Data & Press enter" for dialog as #fldEdit
    print  #fldEdit,"font Times_New_Roman  10 "
    print  #fldEdit, "trapclose [quit.fld.edit]"
     print  #fldEdit.TbEdit, array$(index)
     #fldEdit.TbEdit ,"!setfocus"
' the line below crashes the program conflict somewhere
' rtrn = SendMessageLong(hwnd( #fldEdit.TbEdit),_EM_SETSEL,0,-1)
    wait
[ModFld]
    #fldEdit.TbEdit , "!contents? NewDat$";
    array$(index)=NewDat$
    #main2.listbox1,"reload"
    if index = c-1 then index=0
    print  #main2.listbox1, "selectindex "; index+1

[quit.fld.edit]
    close #fldEdit
    RETURN
[loop2]

    Wait

[saverow]
    for a = 1 to c-1
    RowDat$=RowDat$+array$(a); "   " ' has to be 3 spaces
    next a
    rowdata$(LVITEM.iItem.struct) = RowDat$
    call updaterow rowdata$(LVITEM.iItem.struct)
    RowDat$=""

    goto [quit.main]



[clear]
 


just replace from [editrow] to [clear] in the code I posted in reply #7 & #8 add this function
which isn't working just yet ... appears to be a conflict somewhere (still looking)
Code:

function SendMessageLong(hWnd,msg,w,l)
calldll #user32, "SendMessageA", hWnd as long, _
msg as long, w as long, l as long,_
SendMessageLong as long
end function
 
« Last Edit: Jul 14th, 2017, 06:59am by metro » User IP Logged

Win10 64 HP laptop + desktop Mint Linux 64bit
meerkat
Junior Member
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 59
xx Re: Eye On SQL
« Reply #19 on: Jul 14th, 2017, 09:29am »

Thanks Laurie..

I did add something. Don't like it much! Haven't tested it a lot, but it looks like it works. Download it and give it a try..
If you can get something to work, why not replace the stuff I have and see if it works better.

The routine does not take care of TEXT type where you'd expect a edit box or something similar. It only uses "textbox'

I have to admit, I've spent way more time on interfaces like forms and list than I expected. Even though I'm new to LB, and don't understand a lot of stuff yet, I think it could have been a lot easier. But what do I know??
User IP Logged

metro
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 194
xx Re: Eye On SQL
« Reply #20 on: Jul 14th, 2017, 6:18pm »

One small bug Dan,
boxLabel$(numFields*2) & boxValue$(numFields*2)
throws an error when I try to edit (change) a record. I have changed to a multiple of 4 instead as it appears we have a limit of 10 fields that can be changed.





User IP Logged

Win10 64 HP laptop + desktop Mint Linux 64bit
meerkat
Junior Member
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 59
xx Re: Eye On SQL
« Reply #21 on: Jul 15th, 2017, 05:02am »

Thanks Laurie, I only did * 2 for some extra work space. So you are right a smaller number will work..

I curious.. I always wanted to see see how LB and RB compare in a similar program. So I'm going to duplicate this program in RB. For one, RB has no problems with dynamic forms. And putting buttons next to items in a list will work instead of a combo box with buttons at the bottom will also work. Will be interesting to see the difference...

User IP Logged

Brandon Parker
Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1115
xx Re: Eye On SQL
« Reply #22 on: Jul 21st, 2017, 08:34am »

Ok.....

I apologize for the delay, but the weekend turned into a very busy time and unfortunately my wife and I caught a stomach bug during the visit so needless to say I was down for the count during the early part of the week.

That being said I have pulled together a little demonstration this morning that shows a little ListView action. The code does not go into removing/ editing columns, but that's just as easily done as everything else. The biggest challenge would be to keep track of everything.

In the program that uses a lot of this code the list view handles are not passed directly as they are in the example; the handle held in the array element is pushed into a variable that way most of the code gets reused over and over again.

I hope this helps in showing how great ListViews can be once you get a handle on how they work.

The code is contained in this post and the two below as well due to the length.

Code:
NoMainWin
Global False : False = 0
Global True : True = 1
Global currentRow : currentRow = 0

listViewHandle(0) = _NULL


Call initializeListViewConstants

    WindowWidth = 530
    WindowHeight = 335
    Button #Example.btnAddItem, "Add Item", AddItem, UL, 5, (WindowHeight - 65)
    Button #Example.btnEditItem, "Edit Item", EditItem, UL, 202.5, (WindowHeight - 65)
    Button #Example.btnDeleteItem, "Delete Item", DeleteItem, UL, 405, (WindowHeight - 65)

    Open "ListView Example" For Window As #Example
    Call InitCommonControls
    style = _WS_CHILD Or _WS_VISIBLE Or listViewConstants.LVS.NOSORTHEADER.struct _
            Or listViewConstants.LVS.REPORT.struct Or listViewConstants.LVS.SHOWSELALWAYS.struct _
            Or listViewConstants.LVS.SINGLESEL.struct
    styleEx = _WS_EX_CLIENTEDGE Or _WS_EX_DLGMODALFRAME 'Or listViewConstants.LVS.EX.DOUBLEBUFFER.struct
    listViewHandle(0) = CreateListView(style, styleEx, Hwnd(#Example), GetWindowLong(Hwnd(#Example), _GWL_HINSTANCE), 5, 23, 505, 244)
    result = setListViewFullRowSelect(listViewHandle(0))
    result = listViewShowGrid(listViewHandle(0))
    result = createNewListColumn(listViewHandle(0), 0, 100, "  Item 1")
    result = createNewListColumn(listViewHandle(0), 1, 100, "   Item 2")
    result = createNewListColumn(listViewHandle(0), 2, 100, "   Item 3")
    #Example "TrapClose Quit"

    While Hwnd(#Example)
        Scan

    Wend

    Sub Quit handle$
        result = DestroyWindow(listViewHandle(0))
        Close #handle$
        End
    End Sub



    Sub AddItem handle$
        result = AddListViewData(listViewHandle(0), currentRow, 0, "Data1")
        result = EditListViewData(listViewHandle(0), currentRow, 1, "Data2")
        result = EditListViewData(listViewHandle(0), currentRow, 2, "Data3")
        result = SelectListViewRow(listViewHandle(0), currentRow, True)
        currentRow = (currentRow + 1)
    End Sub

    Sub EditItem handle$
        numListViewEntries = GetListViewItemCount(listViewHandle(0))
        If Not(numListViewEntries) Then Exit Sub
        row = GetSelectedListViewRow(listViewHandle(0))
        item1$ = GetListViewText$(listViewHandle(0), row, 0)
        item2$ = GetListViewText$(listViewHandle(0), row, 1)
        item3$ = GetListViewText$(listViewHandle(0), row, 2)

        result = EditListViewData(listViewHandle(0), row, 0, GetListViewText$(listViewHandle(0), row, 0) + " Edited")
        result = EditListViewData(listViewHandle(0), row, 1, GetListViewText$(listViewHandle(0), row, 1) + " Edited")
        result = EditListViewData(listViewHandle(0), row, 2, GetListViewText$(listViewHandle(0), row, 2) + " Edited")

        result = SelectListViewRow(listViewHandle(0), row, True)
    End Sub

    Sub DeleteItem handle$
        numListViewEntries = GetListViewItemCount(listViewHandle(0))
        If Not(numListViewEntries) Then Exit Sub
        row = GetSelectedListViewRow(listViewHandle(0))
        result = SendMessageLVITEMStruct(listViewHandle(0), listViewConstants.LVM.DELETEITEM.struct, row)
        currentRow = (currentRow - 1)
    End Sub

    Sub InitCommonControls
        CallDLL #comctl32, "InitCommonControls", ret As void
    End Sub 



{:0)

Brandon Parker
« Last Edit: Jul 21st, 2017, 08:52am by Brandon Parker » User IP Logged

Windows 7 Home Premium 64-bit Intel(R) Quad Core(TM) i5 CPU M 430 @ 2.27GHz 4GB DDR3 RAM
Brandon Parker
Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1115
xx Re: Eye On SQL
« Reply #23 on: Jul 21st, 2017, 08:35am »

Here is the second part of the example .....

Code:
    Sub initializeListViewConstants
        'Create the structs for ListViews

        Struct LVITEM, mask       As ulong, _
                       iItem      As long, _
                       iSubItem   As long, _
                       state      As ulong, _
                       stateMask  As ulong,_
                       pszText    As ptr, _
                       cchTextMax As long, _
                       iImage     As long, _
                       lParam     As long, _
                       iIndent    As long

        Struct LVCOLUMN, mask       As ulong, _
                         fmt        As long, _
                         cx         As long, _
                         pszText    As ptr, _
                         cchTextMax As long, _
                         iSubItem   As long, _
                         iImage     As long, _
                         iOrder     As long

        Struct LVFINDINFO, flags        As ulong, _
                           psz          As ptr, _
                           lParam       As ulong, _
                           pt           As ulong, _ 'point structure
                           vkDirection  As ulong

        Struct listViewConstants, LVP.DBLCLK                    As long, _
                                  LVS.REPORT                    As long, _
                                  LVS.SINGLESEL                 As long, _
                                  LVS.SHOWSELALWAYS             As long, _
                                  LVS.NOSORTHEADER              As long, _
                                  LVS.EXDOUBLEBUFFER            As long, _
                                  LVS.EX.FULLROWSELECT          As long, _
                                  LVS.EX.CHECKBOXES             As long, _
                                  LVIS.FOCUSED                  As long, _
                                  LVIS.UNSELECTED               As long, _
                                  LVIS.SELECTED                 As long, _
                                  LVIS.CHECKED                  As long, _
                                  LVIS.UNCHECKED                As long, _
                                  LVIS.STATEIMAGEMASK           As long, _
                                  LVIF.TEXT                     As long, _
                                  LVIF.STATE                    As long, _
                                  LVIR.BOUNDS                   As long, _
                                  LVFI.STRING                   As long, _
                                  LVFI.PARTIAL                  As long, _
                                  LVN.ITEMCHANGED               As long, _
                                  LVM.ENSUREVISIBLE             As long, _
                                  LVM.SETITEMSTATE              As long, _
                                  LVM.GETITEMSTATE              As long, _
                                  LVM.GETITEMTEXT               As long, _
                                  LVM.FINDITEMA                 As long, _
                                  LVM.SETITEM                   As long, _
                                  LVM.GETITEMCOUNT              As long, _
                                  LVM.GETITEMA                  As long, _
                                  LVM.GETSUBITEMRECT            As long, _
                                  LVM.DELETEITEM                As long, _
                                  LVM.INSERTITEM                As long, _
                                  LVM.INSERTCOLUMN              As long, _
                                  LVM.SETEXTENDEDLISTVIEWSTYLE  As long

        'LVM_FIRST = &H1000 or 4096
        listViewConstants.LVP.DBLCLK.struct                     = False
        listViewConstants.LVS.REPORT.struct                     = 1
        listViewConstants.LVS.SINGLESEL.struct                  = 4
        listViewConstants.LVS.SHOWSELALWAYS.struct              = 8
        listViewConstants.LVS.NOSORTHEADER.struct               = 32768
        listViewConstants.LVS.EXDOUBLEBUFFER.struct             = 10000
        listViewConstants.LVS.EX.FULLROWSELECT.struct           = 32
        listViewConstants.LVS.EX.CHECKBOXES.struct              = 4
        listViewConstants.LVIS.FOCUSED.struct                   = 1
        listViewConstants.LVIS.UNSELECTED.struct                = 0
        listViewConstants.LVIS.SELECTED.struct                  = 2
        listViewConstants.LVIS.CHECKED.struct                   = 8192
        listViewConstants.LVIS.UNCHECKED.struct                 = 4096
        listViewConstants.LVIS.STATEIMAGEMASK.struct            = 61440
        listViewConstants.LVIF.TEXT.struct                      = 1
        listViewConstants.LVIF.STATE.struct                     = 8
        listViewConstants.LVIR.BOUNDS.struct                    = 0
        listViewConstants.LVFI.STRING.struct                    = 2
        listViewConstants.LVFI.PARTIAL.struct                   = 8
        listViewConstants.LVN.ITEMCHANGED.struct                = -101
        listViewConstants.LVM.ENSUREVISIBLE.struct              = 4115
        listViewConstants.LVM.SETITEMSTATE.struct               = 4139
        listViewConstants.LVM.GETITEMSTATE.struct               = 4140
        listViewConstants.LVM.GETITEMTEXT.struct                = 4141
        listViewConstants.LVM.FINDITEMA.struct                  = 4109
        listViewConstants.LVM.SETITEM.struct                    = 4102
        listViewConstants.LVM.GETITEMCOUNT.struct               = 4100
        listViewConstants.LVM.GETITEMA.struct                   = 4101
        listViewConstants.LVM.GETSUBITEMRECT.struct             = 4152
        listViewConstants.LVM.DELETEITEM.struct                 = 4104
        listViewConstants.LVM.INSERTITEM.struct                 = 4103
        listViewConstants.LVM.INSERTCOLUMN.struct               = 4123
        listViewConstants.LVM.SETEXTENDEDLISTVIEWSTYLE.struct   = 4150
    End Sub


    Function CreateListView(ByRef style, ByRef styleEx, ByRef hParent, ByRef hInstance, ByRef xloc, ByRef yloc, ByRef width, ByRef height)
        className$ = "SysListView32" + chr$(0)
        CallDLL #user32, "CreateWindowExA", styleEx           As ulong, _  ' extended style
                                            className$        As ptr, _   ' class name
                                            ""                As ptr, _
                                            style             As ulong, _  ' style
                                            xloc              As long, _  ' left x
                                            yloc              As long, _  ' top y
                                            width             As long, _  ' width
                                            height            As long, _  ' height
                                            hParent           As ulong, _ ' parent hWnd
                                            _NULL             As ulong, _
                                            hInstance         As ulong, _ ' hInstance
                                            _NULL             As ulong, _
                                            CreateListView    As ulong    'Hwnd to ListView

        'LVCF.WIDTH = 2 : LVCF.TEXT = 4
        LVCOLUMN.mask.struct = LVCF.WIDTH OR LVCF.TEXT
    End Function

    Function GetWindowLong(hWnd, index)
        CallDLL #user32, "GetWindowLongA", hWnd             As ulong, _
                                           index            As long, _
                                           GetWindowLong    As long
    End Function

    Function GetListViewItemCount(hWndLV)
        GetListViewItemCount = SendMessage(hWndLV, listViewConstants.LVM.GETITEMCOUNT.struct, 0, 0)
    End Function

    Function createNewListColumn(hListView, columnIndex, columnWidth, headerCaption$)
        LVCOLUMN.cx.struct = columnWidth
        LVCOLUMN.pszText.struct = headerCaption$
        LVCF.WIDTH = 2 : LVCF.TEXT = 4
        LVCOLUMN.mask.struct = LVCF.WIDTH OR LVCF.TEXT
        createNewListColumn = SendMessageLVCOLUMNStruct(hListView, listViewConstants.LVM.INSERTCOLUMN.struct, columnIndex)
    End Function

    Function AddListViewData(hWndLV, row, column, myData$)
        LVITEM.mask.struct = listViewConstants.LVIF.TEXT.struct
        LVITEM.iItem.struct = row
        LVITEM.iSubItem.struct = column
        LVITEM.pszText.struct = myData$
        result = SendMessageLVITEMStruct(hWndLV, listViewConstants.LVM.INSERTITEM.struct, 0)
        AddListViewData = SendMessage(hWndLV, listViewConstants.LVM.GETITEMSTATE.struct, 0, 0)
    End Function

    Function EditListViewData(hWndLV, row, column, myData$)
        LVITEM.mask.struct = listViewConstants.LVIF.TEXT.struct
        LVITEM.iItem.struct = row
        LVITEM.iSubItem.struct = column
        LVITEM.pszText.struct = myData$
        EditListViewData = SendMessageLVITEMStruct(hWndLV, listViewConstants.LVM.SETITEM.struct, 0)
    End Function

    Function SelectListViewRow(hWndLV, row, setFocus)
        LVITEM.iItem.struct = row
        LVITEM.iSubItem.struct = 0
        LVITEM.mask.struct = listViewConstants.LVIF.STATE.struct
        LVITEM.state.struct = listViewConstants.LVIS.SELECTED.struct
        If setFocus = True Then
            LVITEM.state.struct = (LVITEM.state.struct Or listViewConstants.LVIS.FOCUSED.struct)
        End If
        'SelectListViewRow = SetFocus(hWndLV)
        SelectListViewRow = SendMessage(hWndLV, listViewConstants.LVM.ENSUREVISIBLE.struct, row, False)
        SelectListViewRow = SendMessageLVITEMStruct(hWndLV, listViewConstants.LVM.SETITEM.struct, 0)
    End Function 



{:0)

Brandon Parker
« Last Edit: Jul 21st, 2017, 08:37am by Brandon Parker » User IP Logged

Windows 7 Home Premium 64-bit Intel(R) Quad Core(TM) i5 CPU M 430 @ 2.27GHz 4GB DDR3 RAM
Brandon Parker
Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1115
xx Re: Eye On SQL
« Reply #24 on: Jul 21st, 2017, 08:36am »

Here is the third part of the example .....

Code:
Function setListViewFullRowSelect(hListView)
        setListViewFullRowSelect = SendMessage(hListView, 4150, 32, 32)'LVS_EX_FULLROWSELECT
    End Function

    Function listViewShowGrid(hListView)
        listViewShowGrid = SendMessage(hListView, 4150, 1, 1)'LVS_EX_GRIDLINES
    End Function

    Function SendMessage(hWnd, Msg, wParam, lParam)
        CallDLL #user32, "SendMessageA" , hWnd        As ulong, _
                                          Msg         As long, _
                                          wParam      As long, _
                                          lParam      As long, _
                                          SendMessage As long
    End Function

    Function SendMessageLVITEMStruct(hWnd, Msg, wParam)
        CallDLL #user32, "SendMessageA" , hWnd                    As ulong, _
                                          Msg                     As long, _
                                          wParam                  As long, _
                                          LVITEM                  As struct, _
                                          SendMessageLVITEMStruct As long
    End Function

    Function SendMessageLVCOLUMNStruct(hWnd, Msg, wParam)
        CallDLL #user32, "SendMessageA" , hWnd                      As ulong, _
                                          Msg                       As long, _
                                          wParam                    As long, _
                                          LVCOLUMN                  As struct, _
                                          SendMessageLVCOLUMNStruct As long
    End Function

    Function DestroyWindow(hWnd)
        CallDLL #user32, "DestroyWindow", hWnd          As ulong, _
                                          DestroyWindow As long
    End Function

    Function GetSelectedListViewRow(hWndLV)
        GetSelectedListViewRow = -1

            numListViewEntries = GetListViewItemCount(hWndLV)
            For row = 0 To (numListViewEntries - 1)
                LVITEM.mask.struct = listViewConstants.LVIF.STATE.struct
                LVITEM.iItem.struct = row
                LVITEM.iSubItem.struct = 0  'first column
                LVITEM.stateMask.struct = listViewConstants.LVIS.SELECTED.struct
                result = SendMessageLVITEMStruct(hWndLV, listViewConstants.LVM.GETITEMA.struct, 0)
                If LVITEM.state.struct And listViewConstants.LVIS.SELECTED.struct Then
                    GetSelectedListViewRow = row
                    Exit Function
                Else
                    If row = (numListViewEntries - 1) Then
                        GetSelectedListViewRow = -1
                        Exit Function
                    End If
                End If
            Next row

    End Function

    Function GetListViewText$(hWndLV, row, column)
        LVITEM.mask.struct = listViewConstants.LVIF.TEXT.struct
        LVITEM.iSubItem.struct = column
        LVITEM.pszText.struct = Space$(_MAX_PATH) + chr$(0)
        LVITEM.cchTextMax.struct = Len(Winstring(LVITEM.pszText.struct))
        EditListViewData = SendMessageLVITEMStruct(hWndLV, listViewConstants.LVM.GETITEMTEXT.struct, row)
        GetListViewText$ = Trim$(Winstring(LVITEM.pszText.struct))
    End Function 



{:0)

Brandon Parker)
« Last Edit: Jul 21st, 2017, 08:37am by Brandon Parker » User IP Logged

Windows 7 Home Premium 64-bit Intel(R) Quad Core(TM) i5 CPU M 430 @ 2.27GHz 4GB DDR3 RAM
meerkat
Junior Member
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 59
xx Re: Eye On SQL
« Reply #25 on: Jul 21st, 2017, 09:21am »

Thanks Brandon
Looks like you did a lot of work on this.

I don't understand it all yet, but I'll have a look at it and see how hard it is to include in the program.

Personally, I wish I could use a browser interface. I'm not smart enough to figure out a link between LB and the browser. You can automatically line up everything up. Plus it has date pickers, time pickers, color pickers, numeric and decimal checks, range checks, scrolled input boxes, canvas and a lot more. But I keep looking..

Dan
User IP Logged

Brandon Parker
Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1115
xx Re: Eye On SQL
« Reply #26 on: Jul 21st, 2017, 10:33am »

The hardest part was pulling everything out of the program it's currently in and making it a usable demonstration.

You can try an ATL control along with HTML to give you what you want.

That being said, everything that you mentioned is doable in LB; it just depends on what you want to do and how you want to go about it. I even have Date/ Time Picker code as well which I use in my program to ensure the user is entering the date/ time in the format that I am expecting to make it easier to insert in the SQLite database.

Obviously looks might be important as well, but you can do anything you want with what Liberty BASIC and Windows makes available.

Let me know if you want to explore anything and I'll lend a hand; start a new thread with any specific request and feel free to PM me and let me know that you done so.

Hopefully I will not take so long to get back to any new requests as I did with Laurie; I feel so terrible about letting that slip through......


{:0)

Brandon Parker
User IP Logged

Windows 7 Home Premium 64-bit Intel(R) Quad Core(TM) i5 CPU M 430 @ 2.27GHz 4GB DDR3 RAM
Rod
Global Moderator
ImageImageImageImageImage


member is offline

Avatar

Graphics = goosebumps!


PM

Gender: Male
Posts: 5526
xx Re: Eye On SQL
« Reply #27 on: Jul 21st, 2017, 10:34am »

Quote:
I wish I could use a browser interface


It is possible to start a browser and to use raw html. I have not read deeply enough to know if this is what you really mean but I just want to be sure you have seen the tutorial here.
User IP Logged

meerkat
Junior Member
ImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 59
xx Re: Eye On SQL
« Reply #28 on: Jul 21st, 2017, 11:05am »

Thanks Rod..
No I have not seen the tutorial.
I did a quick look.
If it doesn't take a lot of code I'm interested.
I'll look for the following features;
- Can put stuff on the browser and get it back by reference to the id='value'
- Can list with multiple lines with buttons that have a variable id. Such as for i = 1 to 20: "<input type button value = "Update" id=upd";i ....
If I can reference "upd"+i then I can get to any button.
- Since HTML has <input type=, number, digital, date, time,text, checkbox, radio and others then I should be able to display stuff with pickers and numeric checks and scroll and all the other stuff on browsers.. And get it back via the id reference..

Anyway ... I hope it works..
Thanks again.. Dan

User IP Logged

metro
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 194
xx Re: Eye On SQL
« Reply #29 on: Jul 21st, 2017, 7:13pm »

Brandon,
Thanks for taking the time out in your busy life. (a heads up retirement is just as busy just no income)
Your coding style is something I am trying to emulate.
I look back and cringe at the spaghetti code I created when i first started.

These functions will come in very handy.

a Bonza effort

Laurie
User IP Logged

Win10 64 HP laptop + desktop Mint Linux 64bit
Pages: 1 2 3  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls