Click in CheckBrowse to Select/Unselect

This forum is for eXpress++ general support.
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:

Click in CheckBrowse to Select/Unselect

#1 Post by Eugene Lutsenko »

Roger!

And there is a similar example works with the database?

Code: Select all

FUNCTION XSample_175()

/*
This sample shows how to use checkbox bitmaps
to provide the ability to check and uncheck
items in a browse.
*/

LOCAL GetList[0], oBrowse, aDir, n := 1, GetOptions

aDir := Directory()
FOR n := 1 TO Len(aDir)
  AAdd(aDir[n],.f.)
NEXT

n := 1

@ 0,0 DCBROWSE oBrowse DATA aDir SIZE 80,12 ;
      PRESENTATION DC_BrowPres() FIT ;
      POINTER n ;
      MARK 11

DCBROWSECOL DATA {|x|x:=DC_GetColArray(11,oBrowse), ;
      IIF(x,BITMAP_CHECKBOX_CHECKED_S,BITMAP_CHECKBOX_UNCHECKED_S)} ;
      PARENT oBrowse HEADER 'Sel' WIDTH 1 ;
      TYPE XBPCOL_TYPE_BITMAP ;
      EVAL {|oB|oB:dataArea:lbClick := {|a,b,o|IIF(oBrowse:colPos=1,(aDir[n,11]:=!aDir[n,11],oBrowse:refreshCurrent()),nil)}}

DCBROWSECOL ELEMENT 1 PARENT oBrowse HEADER 'Name' WIDTH 10
DCBROWSECOL ELEMENT 2 PARENT oBrowse HEADER 'Size' WIDTH 8
DCBROWSECOL ELEMENT 3 PARENT oBrowse HEADER 'Date' WIDTH 8
DCBROWSECOL ELEMENT 4 PARENT oBrowse HEADER 'Time' WIDTH 8

DCGETOPTIONS AUTORESIZE

DCREAD GUI FIT ADDBUTTONS MODAL ;
     OPTIONS GetOptions ;
     TITLE 'Click in CheckBox to Select/Unselect'

RETURN aDir
*** END OF EXAMPLE ***

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

Re: Click in CheckBrowse to Select/Unselect

#2 Post by rdonnay »

And there is a similar example works with the database?
It will require a logical field in the database to toggle. Do you have that?
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: Click in CheckBrowse to Select/Unselect

#3 Post by Eugene Lutsenko »

Hey, Roger!

If necessary - do

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

Re: Click in CheckBrowse to Select/Unselect

#4 Post by Eugene Lutsenko »

rdonnay wrote:
And there is a similar example works with the database?
It will require a logical field in the database to toggle. Do you have that?
Hey, Roger!

And show an example with the database?

And is it possible to make the field headings in this column with radio buttons you can remove or set the value of all switches base?

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

Re: Click in CheckBrowse to Select/Unselect

#5 Post by rdonnay »

I will give you a sample tomorrow or Friday.
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: Click in CheckBrowse to Select/Unselect

#6 Post by Eugene Lutsenko »

rdonnay wrote:I will give you a sample tomorrow or Friday.
Thank you! I just did the mode in which it was going to use. It worked very well. But after your help it will be even better!!! In the same mode displays the Pareto subset of nonlocal neural network. And for selecting these subsets is used a lot of different ways to select this subset from the original set. And this, based on the mark records, not yet used.
Attachments
Безымянный2.jpg
Безымянный2.jpg (200.32 KiB) Viewed 14991 times
Безымянный.jpg
Безымянный.jpg (161.55 KiB) Viewed 14991 times

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

Re: Click in CheckBrowse to Select/Unselect

#7 Post by Eugene Lutsenko »

Roger!

Given in the beginning of the topic, your example is an example of shows how to use checkbox bitmaps
to provide the ability to check and uncheck items in a browse (not an alternative choice).

Is it possible to obtain similar examples with database fields, similar to a radio and just the button? Radio can also be a Boolean field (an alternative choice), and the button calls editor memo field or a custom processing function. It was extremely cool!

In my system (Aidos) users can write applications to the cloud and read them from the cloud. Cloud is on my website. It does not require any programming. Therefore, users can the system share applications and work experience. While reading the applications they now see this screen (see picture): And I would like to do, so they can choose the Aidos-application to radio-select and talk about a specific application with me or each other by clicking on the corresponding button (which are not). I have already faced such a necessity.
Attachments
Безымянный.jpg
Безымянный.jpg (117.35 KiB) Viewed 14967 times

User avatar
Auge_Ohr
Posts: 1406
Joined: Wed Feb 24, 2010 3:44 pm

Re: Click in CheckBrowse to Select/Unselect

#8 Post by Auge_Ohr »

Eugene Lutsenko wrote:Is it possible to obtain similar examples with database fields, similar to a radio and just the button? Radio can also be a Boolean field (an alternative choice), and the button calls editor memo field or a custom processing function. It was extremely cool!
as i understood

Code: Select all

DCBROWSECOL DATA {|x|x:=DC_GetColArray(11,oBrowse), ;
      IIF(x,BITMAP_CHECKBOX_CHECKED_S,BITMAP_CHECKBOX_UNCHECKED_S)} ;
it is just a Bitmap for a logic Field, not a Control "in" a Browse.

while you ask for MLE have a look for \SOURCE\samples\solution\xbpget\mlecol.prg

Code: Select all

CLASS XbpMleColumn FROM XbpGetColumn
so what you ask is a new Control

Code: Select all

CLASS MyRadioColumn FROM XbpColumn()
p.s. Wonder why you ask for Radiobutton in a Column (Cell)
greetings by OHR
Jimmy

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

Re: Click in CheckBrowse to Select/Unselect

#9 Post by Eugene Lutsenko »

Jimmy!

I can't see an example \SOURCE\samples\solution\xbpget\mlecol.prg, because I have 1.9.

If you say in General, that's all I need to control the Aidos-applications and discussion in the cloud. Specifically, I sort of tried to describe as best he could in his broken English. In Russian I still understand it and can articulate quite clearly, but in English it is clear I can not say. In addition to the classes I didn't really understand and actually can't use your advice. I was able to use them I still need to chew on the working examples. If you ask your questions more clear to me, I will try to answer

User avatar
Auge_Ohr
Posts: 1406
Joined: Wed Feb 24, 2010 3:44 pm

Re: Click in CheckBrowse to Select/Unselect

#10 Post by Auge_Ohr »

Eugene Lutsenko wrote:I can't see an example \SOURCE\samples\solution\xbpget\mlecol.prg, because I have 1.9.
this is the Path to v1.9x Sample !

Code: Select all

c:\ALASKA\XPPW32\SOURCE\samples\solution\xbpget\mlecol.prg
as i say :
1.) you have to build a new CLASS
2.) you have to implement it into Express++

about Radiobutton : i wonder why you want a Radiobutton "in" a Browse Cell ?
Radiobutton can be 1 of "n" ... but you just have 1 Cell / Row so how to use it ?
greetings by OHR
Jimmy

Post Reply