Jump to content

Grid input


Recommended Posts

Hi!

Just a exemple of componant.

Not finished, but usable.

[autoit]#include-once

#include <GuiConstantsEx.au3>

#include <Array.au3>

#include <WindowsConstants.au3>

#include <StaticConstants.au3>

Global $s_GuiFocus_LastClassName="",$s_FocusNew=""

saiod1()

Exit

Func saiod1()

Local $AccelKeys, $gui, $atmp, $hListView, $clef

Local $contextmenu, $btnotes, $rpquit, $ligne, $xx, $yy

Local $llFocus=1,$ccFocus=1

$gui = GUICreate("Saisie 'GRID' ", 805, 400)

GUISetBkColor(0xffffaa)

;-----PopMenu-------

$contextmenu = GUICtrlCreateContextMenu(-1)

$pmenreg = GUICtrlCreateMenuItem('&Enregistrer', $contextmenu)

$pmcompte = GUICtrlCreateMenuItem('&Compte (naviguer vers)', $contextmenu)

$pmtiers = GUICtrlCreateMenuItem('&Tiers (naviguer vers)', $contextmenu)

GUICtrlCreateMenuItem("", $contextmenu)

$btnotes = GUICtrlCreateMenuItem('&Bloc-note(s)', $contextmenu)

GUICtrlCreateMenuItem("", $contextmenu)

$rpquit = GUICtrlCreateMenuItem('&Quitter (abandonner)', $contextmenu)

;-----PopMenu-------

$btdown=GUICtrlCreateButton("Down",10,-100,100,40)

$btup=GUICtrlCreateButton("Up",110,-100,100,40)

$btins=GUICtrlCreateButton("Ins",210,-100,100,40)

$btdel=GUICtrlCreateButton("Del",310,-100,100,40)

$btenter=GUICtrlCreateButton("Enter",410,-100,100,40)

$btesc = GUICtrlCreateButton("Echap", 510, -100, 100, 40)

GUICtrlCreateLabel(" {Up} {Down} {Tab} {Shift-Tab} {Ctrl-Ins} {Ctrl-Del} {Enter} {Esc} etc. ",30,10,400,30)

GUISetFont(14,400,0,"Arial Narrow")

Local $nblig=10,$nbcol=6

Dim $ligt[$nblig]=[30,30,60,30,30,30,30,30,30,30] ;size lines

Dim $colt[$nbcol]=[80,100,320,90,90,90] ;size col

Dim $coll[$nbcol]=["Compte","Tiers","Libell

gridinput2.au3

Edited by Michel Claveau
Link to comment
Share on other sites

These lines (copy&paste error)

$result ="Ligne : "& String($llFocus) [email="&@CRLF"]&@CRLF[/email]
$result&="Col : "& String($ccFocus) [email="&@CRLF"]&@CRLF[/email] [email="&@CRLF"]&@CRLF[/email]

have to be changed to this

$result ="Ligne : "& String($llFocus) & @crlf
$result&="Col : "& String($ccFocus)  & @crlf  & @crlf

Otherwise nice example :).

Edited by KaFu
Link to comment
Share on other sites

Anticipated something like that :)... Was in need of something like this 2 weeks ago, sadly I went into another direction (Listview with dynamic InputBox overlay)... maybe I'll change in the long run to your example :party:...

Link to comment
Share on other sites

Re!

> Listview with dynamic InputBox overlay

Hmmmm...

I tried this way. It's fast.

But...

Difficult for use keyboard, for navigate cellule to cellule. I do not found how to have lines with differents heights.

Also, I tried another way: listview, then {Enter} open a child window, who contain all fields of the selected line. At close, values are set in listview's line. It's easy, but no nice, and no convivial.

Edited by Michel Claveau
Link to comment
Share on other sites

Also, I tried another way: listview, then {Enter} open a child window, who contain all fields of the selected line. At close, values are set in listview's line. It's easy, but no nice, and no convivial.

Yep, that's the way I do it now (child gui with input control, described it wrong above :) ), and you're right, design is not nice and keyboard access is not possbile... that's why I guess I'll switch to your design in the long run :party:...
Link to comment
Share on other sites

Hi!

Just a exemple of componant.

Not finished, but usable.

Looks good Michel.

(I like the comment because it compares to "not finished, not usable" for the one I posted :) )

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Hi!

Looks good Michel. (I like the comment

You like/found good only the comment?

Is it that, the "english humor" ?

We say that, in England, on June 1st, cars are going to run to the right (of road).

And, if the experiment is decisive, trucks will begin from July.

Can you confirm?

Link to comment
Share on other sites

Hi!

You like/found good only the comment?

Is it that, the "english humor" ?

No, I said "looks good" and that was about your component.

The comment about your comment was just an extra, um, comment, and that bit was just my humour which might be British, I am unable to tell, but you can ignore it.

We say that, in England, on June 1st, cars are going to run to the right (of road).

And, if the experiment is decisive, trucks will begin from July.

Can you confirm?

:) Yes of course it's true, and if that works well cylists will begin in August. I hear that if that stage is reached the French will start the reverse process, (but beginning with roller skaters), because they don't want to drive on the same side as the British.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Hi!

I have a second example, with vertical scroll (see in the first message).

That take me much time, because the "standard" scrollbar in Autoit do not correspond to my idea. Mine is less complete (no drag the cursor, cursor size is fixe), but it is more adapted to the grid input.

Also, I lost time, before found $WS_EX_CONTROLPARENT in the GUI-child (without it, {TAB} do not run in a child).

Last point (for the moment), use grid input only with few lines. If >250, that become slow...

*** sorry for my bad english ***

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...