English
Forum

GetState(n1, n2)

 

H.Brill
might one with GetState() too whom actually
Click (right/left/middle) receive ?

get the in the momentum not there :
If in a GridBOX clicked becomes, ought to
with Linksklick The Editboxen filled go
and with Rechtsklick one Pop-Menu attend
and the selected carryed out go.

here time one Minimal example :
Declare lever Grid, edit1, edit2, edit3
Declare Int end, row, select, szeile
Declare String decompose, leerzeile
decompose = "Artikel;0;120;Menge;0;60;Preis;0;80"
end = 0
Window 800, 600
@Create("Text", %HWnd, "Artikel :", 10, 70, 70, 25)
edit1 = @Create("Edit", %HWnd, "", 90, 70, 240, 25)
@Create("Text", %HWnd, "Menge :", 350, 70, 70, 25)
edit2 = @Create("Edit", %HWnd, "", 440, 70, 120, 25)
@Create("Text", %HWnd, "Preis :", 10, 110, 70, 25)
edit3 = @Create("Edit", %HWnd, "", 90, 110, 240, 25)
Grid  = @Create("GridBox", %HWnd, decompose, 0, 10, 180, 400, 300)
AddStrings(Grid, "Eier|10|0.25")
AddStrings(Grid, "Butter|5|1.25")
AddStrings(Grid, "Käse|2|2.50")

WhileNot end

    WaitInput

    If @Clicked(Grid)' Sign in the GridBOX clicked ?

        row = @GetCurSel(Grid)

        If @GetState(Grid, row)

            select = 1

                SetText edit1, GetText$(Grid, row, 0)
                SetText edit2, GetText$(Grid, row, 1)
                SetText edit3, GetText$(Grid, row, 2)

            EndIf

            If %MouseKey = 2

                CreateMenu
                AppendMenu 111,"&Leerzeile einfügen"
                AppendMenu 112,"&Oberhalb  set einfügen"
                AppendMenu 113,"&Unterhalb set einfügen"
                TrackMenu %MouseX,%MouseY

                If @MenuItem(111)

                    szeile = @GetcurSel(Grid) + 1
                    InsertString(Grid, szeile, leerzeile)

                ElseIf @MenuItem(112)

                    szeile = @GetCurSel(Grid) - 1
                    InsertString(Grid, szeile, @GetText$(Edit1) + "|" + @GetText$(Edit2) + "|" + @GetText$(Edit3))

                ElseIf @MenuItem(113)

                    szeile = @GetCurSel(Grid) + 1
                    InsertString(Grid, szeile, @GetText$(Edit1) + "|" + @GetText$(Edit2) + "|" + @GetText$(Edit3))

                EndIf

            EndIf

        EndIf

    EndWhile

    End

Habs too time with %MouseKey = 1 for Linksklick probiert.
i think, if GetState() yet 2 - 3 further values for
The Mausklicks zurückliefern could, went the plainer.

is insofern difficult, there GetState() well on a
Rechtsklick reacted and accordingly The Editfields again over-
wrote instead of read go.

How get one now something like correctly. baked ?
 
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.
09/12/15  
 



Sag time if I left click then becomes everything filled and if I right click then becomes too everything filled and a PopupMenü displayed.

at least working it so by me with XP. goes the with you not?
 
09/12/15  
 




RGH
two things:

%MouseKey becomes at first Reading on 0 reset! such a thing How
If %MouseKey = 1

    <...>

ElseIf %MouseKey = 2

    <...>

EndIf


can means not functions. here would %MousePressed To take (see Help!)

select as Variable can Problems bound, there this one Befehlswort is. at least bereitet it with the korrekten Formattierung here in the Forum Problems!

so functions it, How from you desired:
Declare lever Grid, edit1, edit2, edit3
Declare Int end, row, xselect, szeile
Declare String decompose, leerzeile
decompose = "Artikel;0;120;Menge;0;60;Preis;0;80"
end = 0
Window 800, 600
@Create("Text", %HWnd, "Artikel :", 10, 70, 70, 25)
edit1 = @Create("Edit", %HWnd, "", 90, 70, 240, 25)
@Create("Text", %HWnd, "Menge :", 350, 70, 70, 25)
edit2 = @Create("Edit", %HWnd, "", 440, 70, 120, 25)
@Create("Text", %HWnd, "Preis :", 10, 110, 70, 25)
edit3 = @Create("Edit", %HWnd, "", 90, 110, 240, 25)
Grid  = @Create("GridBox", %HWnd, decompose, 0, 10, 180, 400, 300)
AddStrings(Grid, "Eier|10|0.25")
AddStrings(Grid, "Butter|5|1.25")
AddStrings(Grid, "Käse|2|2.50")

WhileNot end

    WaitInput

    If @Clicked(Grid)' Sign in the GridBOX clicked ?

        row = @GetCurSel(Grid)

        If (%MousePressed = 1) and (GetState(Grid, row))

            xselect = 1
            SetText edit1, GetText$(Grid, row, 0)
            SetText edit2, GetText$(Grid, row, 1)
            SetText edit3, GetText$(Grid, row, 2)

        ElseIf %MousePressed = 2

            CreateMenu
            AppendMenu 111,"&Leerzeile einfügen"
            AppendMenu 112,"&Oberhalb  set einfügen"
            AppendMenu 113,"&Unterhalb set einfügen"
            TrackMenu %MouseX,%MouseY

            If @MenuItem(111)

                szeile = @GetcurSel(Grid) + 1
                InsertString(Grid, szeile, leerzeile)

            ElseIf @MenuItem(112)

                szeile = @GetCurSel(Grid) - 1
                InsertString(Grid, szeile, @GetText$(Edit1) + "|" + @GetText$(Edit2) + "|" + @GetText$(Edit3))

            ElseIf @MenuItem(113)

                szeile = @GetCurSel(Grid) + 1
                InsertString(Grid, szeile, @GetText$(Edit1) + "|" + @GetText$(Edit2) + "|" + @GetText$(Edit3))

            EndIf

        EndIf

    EndIf

EndWhile

End

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
09/12/15  
 




H.Brill
thanks,
so wished I it having.
 
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.
09/13/15  
 




Jörg
Sellmeyer
[OFFTOPIC]I wanted to The Thread into normal Forum (by "Ausschneiden") move, there itself the trouble Yes as keines herausgestellt has. unfortunately functions not.[/OFFTOPIC]
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
09/13/15  
 



[OFFTOPIC]the Topic is now in "XProfan Forum", I habs there not there moved. I must but once more zusehen that the move and detach of Subtopics sure functions and the one Topics To Subtopics move can.[/OFFTOPIC]
 
09/13/15  
 




Jörg
Sellmeyer
[OFFTOPIC]OK - then shining it still functions to have. I Have anyway only ne Fehlerseite seen, as i it made have.

P.s.: These Offtopic-Posts lösche I later again.
[/OFFTOPIC]
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
09/13/15  
 



can You me ask the Error Code name? 500 or 404? the would me important. has the process very long gedauert or went it very fix?
 
09/13/15  
 




Michael
W.
I got ne 404
 
XProfan X3
System: Windows 8/10, XProfan X4
Programmieren, das spannendste Detektivspiel der Welt.
09/14/15  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

6.155 Views

Untitledvor 0 min.
Ralf Netz05/22/21
Michael W.08/11/18
HofK08/08/18
Jörg Sellmeyer05/25/18
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