Position of get

This forum is for eXpress++ general support.
Post Reply
Message
Author
c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Position of get

#1 Post by c-tec »

Hello Roger,
I have a complex dialog that is created from a database. With dcread gui fit the dialog size is calculated automatically. Now I have the problem that one element causes the dialog to get larger than expected. But I do not find the getelement in the getlist that is wrong positioned, it is not visible in the dialog. I have tried to check the getlist, but fund no element with my function that is out of the expected dialog size. Can you give me a tip for my testfunction to find the element the is more left then the defined screensize ?
regards
Rudolf

Code: Select all

function checkgetlist(aGetlist,aStaticSize) // size = {960,720}
******************************************************************
local x,cID,nZeile,nSpalte,nUnten,nLinks,nBreite,nHoehe
for x := 1 to len(aGetlist)
     cID     := aGetlist[x,cGETLIST_ID]
     nZeile  := aGetlist[x,nGETLIST_STARTROW]
     nSpalte := aGetlist[x,nGETLIST_STARTCOL]
     nUnten  := aGetlist[x,nGETLIST_ENDROW]
     nLinks  := aGetlist[x,nGETLIST_ENDCOL]
     nBreite := aGetlist[x,nGETLIST_WIDTH]
     nHoehe  := aGetlist[x,nGETLIST_HEIGHT]
     if !empty(nSpalte)
          if nSpalte > aStaticSize[1]
               altd()
          endif
          if !empty(nWidth)
               if nSpalte + nWidth > aStaticSize[1]
                    altd()
               endif
          endif
     endif
     if !empty(nWidth)
          if nWidth > aStaticSize[1]
               altd()
          endif
     endif
next x
toastmsg("Ready!")
return .t.
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Position of get

#2 Post by skiman »

Hi,

I don't know if this is your exact code of the testfunction?

If so, you use nWidth instead of nBreite?
Best regards,

Chris.
www.aboservice.be

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Position of get

#3 Post by c-tec »

Hello,
you are right, I have extracted the part and forgetten to rename this var. For now I calculate the size in my code and set the window size in getoptions. But would be interesting for me to find the get element that is placed outside, because the dialogs are datadriven and I could make a warning message for such gets.
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: Position of get

#4 Post by reganc »

Are you sure that it is one of the get elements that is making the dialog too big?

If the title of the dialog is long, that can have an effect as FIT also takes into account the title text length (and it's not really that good at doing that either).
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Position of get

#5 Post by c-tec »

Hello,
I dont think that the title effects the size of the dialog, it is truncated and filled with ... at the end.
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Position of get

#6 Post by rdonnay »

You should get used to using the eXpress++ object tree browser to view all the objects in a tree-view.

DCREAD GUI .. EVAL {|o|(wtf o)}

Double-click the DC_Dialog1 that appears in the debug window.
The eXpress train is coming - and it has more cars.

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Position of get

#7 Post by c-tec »

Hello Roger,
it is complicated to check a getlist with about 500 elements to check which one is out of range. So I hoped that it is possible like in my function.
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Position of get

#8 Post by rdonnay »

it is complicated to check a getlist with about 500 elements to check which one is out of range. So I hoped that it is possible like in my function.
You may need to write a special program that walks thru the getlist and then reports anything that may look like an anomoly:

Code: Select all

FOR i := 1 TO Len(GetList)

  oXbp := aGetList[i,oGETLIST_OBJECT]

  IF oXbp:currentPos()[1] > 500 .OR. oXbp:currentPos()[2] > 500 .OR. ;
     oXbp:currentSize()[1] > 1000 .OR. oXbp:currentSize()[2] > 1000

     WTF aGetList[i]

  ENDIF

NEXT
The eXpress train is coming - and it has more cars.

Post Reply