Skip to content

EditSelection

Forums Forums SIMPOL Programming EditSelection

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #98
    Reto Huber
    Member

    Is there in SIMPOL a command for Superbase.EditSelection = 0?

    #1599
    Michael
    Keymaster

    On 16/04/2012 19:37, Reto Huber wrote:
    > Is there in SIMPOL a command for Superbase.EditSelection = 0?
    >

    Off-hand, I can't think of one. This is the default Windows behavior as I recall, and that is how the controls work.

    Ciao, Neil

    #1933
    JD Kromkowski
    Participant

    In theory, you create a function as part of Ongotfocus.

    But, I'm not sure 0, is totally the default.

    If you enter a field, EditSelection = 0 is what it looks like.
    But if you then tab through fields, EditSelection = -1 is what it looks
    like.

    But that brings up a related question.

    Copy, Cut, Paste

    Right now even in "Personal" you don't have functions attached to these
    menu items. Although, I've been a right-mouse man for the decades of
    the windows experience; being able to hook this up I think is kind of
    essential to be taken seriously.

    What exactly are the equivalents of COPY FROM and COPY TO or

    EditCopy()
    EditCut()
    EditPaste()

    It seems like it should be something like

    |wxclipboardputdata| (/|/||/|//|/||/|/Var.control.gettext()) for the
    copy function

    Maybe for paste?

    string clipboard|
    wxclipboardgetdata| (clipboard)
    Var.control.settext(clipboard)

    But how do you tell where the focus is from the menu?

    ||Since it hasn't been implemented in Personal, it obviously more
    complicated.
    api dll calls?

    On 5/8/2012 6:02 PM, Neil Robinson wrote:
    > On 16/04/2012 19:37, Reto Huber wrote:
    >> Is there in SIMPOL a command for Superbase.EditSelection = 0?
    >>
    > Off-hand, I can't think of one. This is the default Windows behavior as I recall, and that is how the controls work.
    >
    > Ciao, Neil

    #1934
    Michael
    Keymaster

    On 09/05/2012 17:51, John D Kromkowski wrote:
    > In theory, you create a function as part of Ongotfocus.
    >
    > But, I'm not sure 0, is totally the default.
    >
    > If you enter a field, EditSelection = 0 is what it looks like. But if you then tab through fields, EditSelection = -1 is what
    > it looks like.
    >
    > But that brings up a related question.
    >
    > Copy, Cut, Paste
    >
    > Right now even in "Personal" you don't have functions attached to these menu items. Although, I've been a right-mouse man
    > for the decades of the windows experience; being able to hook this up I think is kind of essential to be taken seriously.

    Actually, the standard Windows defaults work in the fields Ctrl+C, Ctrl+X, Ctrl+V; this is built into the Windows controls. The
    reason the menu items aren't working is because in Superbase they actually have a different function. They copy an entire record
    to the clipboard, and paste an entire record. I simply haven't gotten around to writing this code yet, but probably in the next
    release.

    > What exactly are the equivalents of COPY FROM and COPY TO or
    >
    > EditCopy() EditCut() EditPaste()
    >
    >
    > It seems like it should be something like
    >
    > |wxclipboardputdata| (/|/||/|//|/||/|/Var.control.gettext()) for the copy function
    >
    > Maybe for paste?
    >
    > string clipboard| wxclipboardgetdata| (clipboard) Var.control.settext(clipboard)
    >
    > But how do you tell where the focus is from the menu?

    Exactly right, and in fact that is why I haven't bothered yet. I suspect I would check the form.focuscontrol to see which control
    has focus, and if it is an edit control then I would do the action on what is selected in the control using .getselection().

    > ||Since it hasn't been implemented in Personal, it obviously more complicated. api dll calls?

    No more an issue of priority.

    Ciao, Neil

    #1938
    JD Kromkowski
    Participant

    if the standard windows keys work, i.e.

    Ctrl+C, Ctrl+X, Ctrl+V

    Wouldn't be the simpliest to simple hook up the menus to a function that uses sendkeys() for which there is already a library?

    JDK

    #1941
    Michael
    Keymaster

    On 18/05/2012 16:21, John D Kromkowski wrote:
    > if the standard windows keys work, i.e.
    >
    > Ctrl+C, Ctrl+X, Ctrl+V
    >
    > Wouldn't be the simpliest to simple hook up the menus to a function that uses sendkeys() for which there is already a library?

    The problem isn't in trapping the key presses, I just haven't written the code yet that copies records and pastes them.

    Also, I avoid using sendkeys for mainstream code where possible, since it is a Windows-only solution.

    Ciao, Neil

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.