English
Forum

List view.dll: trouble List view on TabContol, trouble update

 

Julian
Schmidt
Hi,
I stand straight to a trouble.
and of course create I over The List view.dll one List view on a TabControl.
this List view would I now gladly by Raise Line & RaiseColum others colours zuordnen.
These command shine though on a TabControl not To functions, there my List view not of my wanted Farbdarstellung displayed becomes.
once I the List view on the Mainwindow create becomes the List view with my wanted Farbdarstellungen displayed!
If I the List view on the Mainwindow create comes it unfortunately To complications with others Controls, and so it so important is it on the TabControl To let.

How can I The Farbdarstellung one List view, which on a TabControl prepares watts, Change?

LG

Julian57
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
01/27/12  
 




Thomas
Freier
this trouble know I really not. Error in your code?
Declare lvdll&,listview&,Text$,x&,z&,ilist&
 $I Listview_Funktionen.inc
lvdll&=usedll("Listview.dll")
cls
var T&=CREATE("TABCTRL",%HWND,"Reiter1",10,10,400,360)
Var TAB2&=@InsertTab(T&,2,"Reiter2")
var ELEMENT1&=Control("DIALOG","",$54001100,0,25,400,380,t&,0,%hinstance,$0)
InitMessages(%hwnd)
InitMessages(ELEMENT1&)
var LVIEW&=CREATELISTVIEW(ELEMENT1&,%HINSTANCE,0,$FFFFFF,-1,$21)
InsertColumn LVIEW&,"SPALTE 1",60,0
InsertColumn LVIEW&,"SPALTE 2",60,0
InsertColumn LVIEW&,"SPALTE 3",60,0

whileLoop 10

    SetItem LVIEW&,"123","345","678"

wend

SHOWLISTVIEW(LVIEW&,20,40,325,200)
text$="101"
RaiseColumns(LVIEW&,addr(text $),0,Rgb(185,209,249))
Var ELEMENT2&=Control("DIALOG","",$54001100,0,25,400,380,t&,0,%hinstance,$0)
InitMessages(ELEMENT2&)
var LVIEW2&=CREATELISTVIEW(ELEMENT2&,%HINSTANCE,0,$FFFFFF,-1,$21)
InsertColumn LVIEW2&,"Test 1",60,0
InsertColumn LVIEW2&,"Test 2",60,0
InsertColumn LVIEW2&,"Test 3",60,0

whileLoop 10

    SetItem LVIEW2&,"abc","def","ghu"

wend

SHOWLISTVIEW(LVIEW2&,20,40,325,200)
text$="101"
RaiseColumns(LVIEW2&,addr(text $),0,Rgb(185,209,249))

Whileloop 0,10,2

    Raise Line(LVIEW2&,(&loop+1000000),0,Rgb(0,128,128))

Endwhile

Raise Line(LVIEW2&,600,0,Rgb(128,128,128))
usermessages 16'--terminate intercepting

WHILE 1

    WAITINPUT
    case %umessage=16:break'---end
    Case @TabChanged(T&): TAB_WECHSEL GetActiveTab(T&)

ENDWHILE

CloseMessages(%hwnd)
CloseMessages(ELEMENT1&)
CloseMessages(ELEMENT2&)
FREEDLL lvdll&
DestroyWindow(%hwnd)
End

Proc TAB_WECHSEL

    Parameters T_nr%

    IF T_nr% = 0

        Showwindow(element1&,1)
        Showwindow(element2&,0)

    ElseIF T_nr% = 1

        Showwindow(element1&,0)
        Showwindow(element2&,1)

    EndIf

ENDPROC

 
Gruß Thomas
Windows XP SP2, XProfan X2
01/27/12  
 




Julian
Schmidt
Yes, I have InitMessages, CloseMessages not specific on the TabControl angewand.
now functions the dye. thanks Thomas!

though have I fixes, that The colours now and than first to a klick, or. scroll inside the List view attend,though I really with UpdateListview the List view aktualisiere!? white someone council?
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
01/27/12  
 




Thomas
Freier
Yes, is sometimes a problem. attempt time at TAB-change "After To färben"
ElseIF T_nr% = 1

Showwindow(element1&,0)
Showwindow(element2&,1)

Whileloop 0,10,2

    Raise Line(LVIEW2&,(&loop+1000000),0,Rgb(0,128,128))

Endwhile

Raise Line(LVIEW2&,600,0,Rgb(128,128,128))
or
ElseIF T_nr% = 1

Showwindow(element1&,0)
Showwindow(element2&,1)
Raise Line(LVIEW2&,600,0,Rgb(128,128,128))
because mostly is the 1.TAB OK.
 
Gruß Thomas
Windows XP SP2, XProfan X2
01/27/12  
 




Julian
Schmidt
I do eig. to dye, nevertheless comes it ex and on to the trouble.

another question:
Can detect, whether The Sort Lines changed watts?. once one any Lines after a slot up, downward sortiert, is correct The Farbgebung unfortunately not any more. therefore would I gladly inquire and if necessary, the List view new dye. someone a idea?
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
01/27/12  
 



dye first if the TAB active is?
You can Yes inquire, whether the Column Button pressed watts. an slot with Farbwert with 0 wide. first any Lines entfärben and then whom Farbwert read and row for row dye.If the Spaltenbreiten not changed go can is it no trouble. otherwise inquire whether The Column the Farbwertes changed watts and again on 0 settle.
Greeting Thomas
 
01/27/12  
 




Julian
Schmidt
Untitled (27.01.12)
You can Yes inquire, whether the Column Button pressed watts. an slot with Farbwert with 0 wide. first any Lines entfärben and then whom Farbwert read and row for row dye.If the Spaltenbreiten not changed go can is it no trouble. otherwise inquire whether The Column the Farbwertes changed watts and again on 0 settle.


Sry. i see not How You the mean? How can I detect whether The Sorting the Lines changed watts?
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
01/27/12  
 



You bestimmst still where sortiert go must over
{{FROMQUOT2}}
Statement not found: ASORTLISTVIEW(H,B,A)

AUTOSORTLISTVIEW H,S1,S2,S3,...,S12

CERTAINLY, IN WHICH NATURE AND POINT EACH SINGLE SLOT ONE LISTVIEWS SORTIERT GO SHOULD, WHEN THE USERS
WHOM SUITABLE COLUMN BUTTON PRESSED HAS.


, then can you - see example Alle_Maustasten_abfangen.prf to one Linksklick in the list view Verify, in which slot the Linksklick instead of found. was is a slot in the a Sorting permitted was, so watts new sortiert and the Lines must, if The Farbgebung on a row tied was, new colored go.
 
01/27/12  
 




Julian
Schmidt
OK so functions at least the inquire. it zurück though immernoch diverse Problems with the update on!

here the integral View source.
'...

while 1

    waitinput 30
    '...

    if (getfocus(neu&) or menuitem(101)) and (Getactivetab(hTab1&)<>4)'If Button add pressed watts....

        '...
        ColorListview(LV&[Getactivetab(hTab1&)])'won't correctly updated

    Endif

    '...
    x&=GetVar(4)

    If x&<>-1'If one beliebiger Spaltbutton pressed watts...

        ColorListview(LV&[Getactivetab(hTab1&)])'won't correctly updated

    EndIf

    '...

Endwhile

'...

Proc ColorListview

    Parameters hdl&
    declare spalte&
    case hdl&=LV&[0] : spalte&=4
    case hdl&=LV&[1] : spalte&=5
    case hdl&=LV&[2] : spalte&=2
    case hdl&=LV&[3] : spalte&=2
    var erledigt&=RGB(0,190,0)
    var unerledigt&=RGB(255,30,30)

    whileloop 0,GetLines(hdl&)-1,1

        GetItemText(hdl&,area#,spalte&,&loop)
        case String $(area#,0)="Erledigt" : Raise Line(hdl&,&loop+1000000,RGB(255,255,255),erledigt&)
        case String $(area#,0)="Unerledigt" : Raise Line(hdl&,&loop+1000000,RGB(255,255,255),unerledigt&)

    Endwhile

    UpdateListview(hdl&)
    Return 1

ENDPROC

 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
01/28/12  
 




Detlef
Jagolski
attempt time the!
while 1

    waitinput 30
    '...

    if (getfocus(neu&) or menuitem(101)) and (Getactivetab(hTab1&)<>4)'If Button add pressed watts....

        '...
        ColorListview(LV&[Getactivetab(hTab1&)])'won't correctly updated
        ~RedrawWindow(LV&[Getactivetab(hTab1&)],0,0, ~RDW_FRAME | ~RDW_INVALIDATE | ~RDW_ALLCHILDREN | ~RDW_UPDATENOW | ~RDW_INTERNALPAINT)

    Endif

    '...
    x&=GetVar(4)

    If x&<>-1'If one beliebiger Spaltbutton pressed watts...

        ColorListview(LV&[Getactivetab(hTab1&)])'won't correctly updated
        ~RedrawWindow(LV&[Getactivetab(hTab1&)],0,0, ~RDW_FRAME | ~RDW_INVALIDATE | ~RDW_ALLCHILDREN | ~RDW_UPDATENOW | ~RDW_INTERNALPAINT)

    EndIf

    '...

Endwhile

'...

Proc ColorListview

    Parameters hdl&
    declare spalte&
    case hdl&=LV&[0] : spalte&=4
    case hdl&=LV&[1] : spalte&=5
    case hdl&=LV&[2] : spalte&=2
    case hdl&=LV&[3] : spalte&=2
    var erledigt&=RGB(0,190,0)
    var unerledigt&=RGB(255,30,30)

    whileloop 0,GetLines(hdl&)-1,1

        GetItemText(hdl&,area#,spalte&,&loop)
        case String $(area#,0)="Erledigt" : Raise Line(hdl&,&loop+1000000,RGB(255,255,255),erledigt&)
        case String $(area#,0)="Unerledigt" : Raise Line(hdl&,&loop+1000000,RGB(255,255,255),unerledigt&)

    Endwhile

    UpdateListview(hdl&)
    Return 1

ENDPROC

 
XProfan X2
XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11
01/28/12  
 




Julian
Schmidt
Detlef Jagolski (28.01.12)
attempt time the!


The attempt was is worth. the update functions perfect!
thanks you both!
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
01/28/12  
 



~Redraw... resolve many Problemchen, but have you got it to Franks, the Yes economical program, example time attempts. d.h., n-1 with &loop+100000 and latest row with n?
var Spalte&=1
var Text$=""

Whileloop 0,(GetCount(LVIEW2&)-2),1

    Text$=trim$(GetText$(LVIEW2&,&loop,Spalte&))

    SELECT Text$

        CASEOF "erledigt"

        Raise Line(LVIEW2&,(&loop+1000000),0,Rgb(109,248,103))'any unerledigten dye

        CASEOF "unerledigt"

        Raise Line(LVIEW2&,(&loop+1000000),0,Rgb(210,222,222))'any unerledigten dye
        OTHERWISE
        Raise Line(LVIEW2&,(&loop+1000000),0,Rgb(255,255,255))'dye

    ENDSELECT

Endwhile

text$=trim$(GetText$(LVIEW2&,(GetCount(LVIEW2&)-1),Spalte&))

SELECT Text$

    CASEOF "erledigt"

    Raise Line(LVIEW2&,(GetCount(LVIEW2&)-1),0,Rgb(109,248,103))'any unerledigten dye

    CASEOF "unerledigt"

    Raise Line(LVIEW2&,(GetCount(LVIEW2&)-1),0,Rgb(210,222,222))'any unerledigten dye
    OTHERWISE
    Raise Line(LVIEW2&,(GetCount(LVIEW2&)-1),0,Rgb(255,255,255))'dye

ENDSELECT

 
01/28/12  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

10.783 Views

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