Change of a format of the field DCBROWSECOL on button press

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Change of a format of the field DCBROWSECOL on button press

#1 Post by Eugene Lutsenko »

Prompt how to change, please, a format of display of the field DCBROWSECOL on button pressing. I can't transfer value of variables from function of processing of pressing of the button in that part of the program which will organize database display. As a result of a field are always displayed in a format which was set by the first and then I can't change it from the function started on pressing of the button at the displayed database.

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

Re: Change of a format of the field DCBROWSECOL on button pr

#2 Post by rdonnay »

Run Xdemo.Exe - Samples - Sample Group 1 - Picklist
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Change of a format of the field DCBROWSECOL on button pr

#3 Post by Eugene Lutsenko »

rdonnay wrote:Run Xdemo.Exe - Samples - Sample Group 1 - Picklist
Thanks! Because of problems of translation into English not always it is possible distinctly and to formulate to me accurately the thought in English, as in Russian. I meant not a set (list) of fields, and a format of display of the field, set in the dialogue opening on pressing of the button, during base viewing.

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: Change of a format of the field DCBROWSECOL on button pr

#4 Post by Cliff Wiernik »

You could always do this:

Code: Select all

  DCBROWSECOL DATA {|| ' '+TRANSFORM(LB_SSNFormat(SIMPLE->lIsCanada,SIMPLE->ssn1), ;
                                     LB_SSNPict(SIMPLE->lIsCanada)) } PARENT d_oBrowse ;        

where the data value is a code block and you can format anything here or you could do this:

  DCBROWSECOL FIELD TEMPLATE->sec_name PARENT d_oBrowse ;                    
    HEADER 'Name'  ;
    PICTURE {|| iif(recno()%2=0,'@K!','@K')} ;
    WIDTH m->G_nBrowColPixels * 28 PIXEL               
Either will allow you to change the format of a browse column cells data based on a button press.

You just refresh the browse.

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

Re: Change of a format of the field DCBROWSECOL on button pr

#5 Post by rdonnay »

Are you asking a question or are you showing us how to do this?
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Change of a format of the field DCBROWSECOL on button pr

#6 Post by Eugene Lutsenko »

I asked, because I am not able to do it. Generally I want to make a mode displaying different databases in one window (look drawing).
Image
To display what database the user sets in button pressing in the bottom of a window. Databases differ quantity and names of a line and columns and formats of display of data in columns. I made a similar mode, but it is not pleasant to me, as it turned out and not all at me and it turned out. I copy bases set for display in one base which I show. It clumsy and takes appreciable time at increase in dimension of databases. Thus I can not change a format and quantity of displayed columns. Certainly, I can make for each base separate function for display and cause it from the menu. I understand that it will work well. But it isn't pleasant to me, since these bases would need to be displayed on pressing of buttons in one window as they have similar sense and so they would need to be compared visually.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Change of a format of the field DCBROWSECOL on button pr

#7 Post by Eugene Lutsenko »

Made a call through the menu of three modules instead of one without any intricate decisions and everything perfectly works: both names of columns different and formats of visualization of fields what as it is necessary.

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

Re: Change of a format of the field DCBROWSECOL on button pr

#8 Post by rdonnay »

Probably the best example of how to do what you want is DC_Dbu().

This is a database management system written in Xbase++ and eXpress++.

Have you used XDOT.EXE yet?
The eXpress train is coming - and it has more cars.

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Change of a format of the field DCBROWSECOL on button pr

#9 Post by Eugene Lutsenko »

I at first thought to use DC_Dbu (), but then it seems more or less understood with editing of databases (including connected by the relation "one to many") by means of DCBROWSECOL and it me quite arranges. It will allow to make everything that is necessary. Program realization and longer ikhodny code can be a little simpler, but everything clearly and well works. Possibilities too rather flexible. Generally thank you for possibility to use your development. Without them everything would look much more gloomy. XDOT.EXE I started and looked, but yet didn't use.

Post Reply